Pages

Showing posts with label tutorial. Show all posts
Showing posts with label tutorial. Show all posts

Wednesday, February 11, 2015

How to Make Simple Login and Register System in VB Net Video Tutorial

This article is on creating a simple registration and login system without using a database in visual basic. So this project uses Properties present in My Project. The link to download the project is also given in this article.

Also Read: Lab Login System Mini Project in VB.Net

The Login system will allow us to:
  • Add a single user not multiple (because we are not using a database)
  • Login using that credentials
How to Make Simple Login and Register System in VB.Net [Video]

Video Tutorial to Make Simple Login and Register System in VB.Net 


- Download Project -

Read more »

Thursday, February 5, 2015

Android beginner tutorial Part 59 Implicit Intents

Today well learn how to use implicit Intents and intent filters.

So far weve only used Explicit Intents and called Activities directly. Those always had a clear target - an Activity class to launch. Implicit Intents dont name a target.

An Explicit Intent is always delivered to its target, while Implicit ones need to pass a filter. Intent filters are elements of an applications manifest, which dictate which intents to receive and which ones to block.

An Intent Filter in the manifest file has fields that describe the action, data and category of the Activity. All these fields can be specified in the Implicit Intent and then compared with available filters. If the Intents action, data and category match with the filters of an Activity, that Activity is launched.

Today we will update our application from the previous tutorial and create a new application, which launches the first one using an implicit intent.

Firstly, go to the AndroidManifest.xml of the first application. View it as plain XML file and youll find this in the code:

            <intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

We can add multiple filters for an activity. Lets create a new custom one, which also uses 2 fields - action and category. Set their values as shown:

        <activity
android:name="com.kircode.codeforfood_test.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.kircode.codeforfood_test.LAUNCH_TEST" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

The "com.kircode.codeforfood_test.LAUNCH_TEST" String is what we will later give to an Implicit Intent to search for a suitable Activity to launch.

The manifest xml looks like this:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.kircode.codeforfood_test"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.CAMERA"/>

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.kircode.codeforfood_test.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.kircode.codeforfood_test.LAUNCH_TEST" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name="com.kircode.codeforfood_test.SecondActivity"></activity>
</application>

</manifest>

Now create a new Application (File>New>Android Application Project). I called mine "CodeForFood Test Two". When youve created it, go to its layout xml and add a button:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >

<TextView android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="32sp"
android:text="Second Application"
/>

<Button android:id="@+id/launchButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Launch CodeForFood"
/>

</LinearLayout>

In the java class of the new Activity, use this code:

package com.example.codeforfoodtest_two;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends Activity{


@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

final Button btn = (Button)findViewById(R.id.launchButton);
btn.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
Intent intent = new Intent("com.kircode.codeforfood_test.LAUNCH_TEST");
startActivity(intent);
}
});
}

}

As you can see, the code to create an Implicit Intent is simple. All we do is specify the action as the parameter of the constructor.

If you also want to filter by data, specify the data in the second parameter, or using the setData() method.

If you want to filter by category too, use addCategory() method of the intent.

Thats all for today!

We now have a second application, which launches the first application using an implicit intent.

Thanks for reading!
Read more »

Wednesday, February 4, 2015

HTML5 Tutorial

HTML5 Tutorial

Hi every body, I am going to explain what HTML5 is,what is its features,its advantages and its disadvantages as well as some demos tutorial with code.

HTML5 is the latest evolution of HTML.It is new version of html comes with new html elements,attributes and behaviors.and it is a larger set of technologies  that allows to develop powerfull web applications as well as mobile apps.this set is some times called it as HTML5 and friends and shorten to HTML5.Html5 is specified to develop or designed to open to all developers(means development code is visible to all people).HTML5 is still a work in progress. However, the major browsers support many of the new HTML5 elements and APIs.

Where this HTML5 started?

HTML5 is a cooperation between the World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG).
WHATWG was working with web forms and applications, and W3C was working with XHTML 2.0. In 2006, they decided to cooperate and create a new version of HTML.
Some rules for HTML5 were established:
  • New features should be based on HTML, CSS, DOM, and JavaScript
  • Reduce the need for external plugins (like Flash)
  • Better error handling
  • More markup to replace scripting
  • HTML5 should be device independent
  • The development process should be visible to the public

This tutorial links to different pages which consists of above features with demos code explained clearly.

Semantics : Describes mostly how you place your content(mark up your content).
Connectivity : Allowing you to connect with different servers and exchange data.
OffLine and Storage : Allowing webpages to store data locally(client side) and operate offline more efficiently.
Multimedia : How to use Audio and Video new Elemnets.
2D/3D Graphics & Effects : Explains how to create 2d and 3d graphics in your applications.
Performance & Integration : Explains how HTML5 provides speed optimization and better usage of computer hardware.
Device Access : Explains How to use or access different input and output resourses of a device.
Style : Explains authors or developers can write most sophisticated articles and how to increase the appearence by styling them.



Read more »