Académique Documents
Professionnel Documents
Culture Documents
http://www.oracle.com/technetwork/java/javas
e/downloads/index.html
And ensure that you have the Java JDK
installed.
The JDK is the Java Development Kit. You need this package to do any Java
development on your machine, Android or otherwise. Be sure to look for the
Java Platform, Standard Edition JDK.
Downloading and Installing Android studio:
android: id=”@+id/txtUsername”
android: hint=”Username”
android:layout_width=”fill_parent”
android:layout_height=”wrap_content” />
Code:
EditText txtUserName = (EditText) findViewById(R.id.txtUsername);
Layout:
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
Code:
final CheckBox checkbox = (CheckBox) findViewById(R.id.checkbox);
checkbox.setOnClickListener(new OnClickListener() {
if (((CheckBox) v).isChecked()) {
//It’s Checked
}
if (((CheckBox) v).isChecked()) {
//It’s Checked
}
else {
//Not Checked
}
}
});
Code:
final CheckBox checkbox = (CheckBox) findViewById(R.id.checkbox);
checkbox.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
if (((CheckBox) v).isChecked()) {
//It’s Checked
}
else {
//Not Checked
}
}
});
And some of the codes like Radio Button , list view , linear layout ,relative layout ,
table layout
CONNECTING TO THE GOOGLE PLAY:-
This section explains what is necessary to publish your application to the
Google Play and which has other requirements like Amazon Android
Marketplace,. But it may be more of a marketing choice than a development
choice, we decided to go with the explanation of the basic Google Play
distribution process.
Getting an Android Developer Account:-
Signup is a snap for a dev account. Just make sure you have a Google
account (Gmail, or Google Apps), $25 (one-time registration fee), head to
https://play.google.com/apps/publish/signup, and you are all set.
Signing Your Application:-
Signing your application with Eclipse is a relatively simple process:
1. Right-click your project in the Package Explorer and select File ➪ Export.
2. Select Export Android Application.
3. Complete the steps of the wizard and you will have a key store, and a
signed release build of your app ready for the market.
When you have created your key store, make sure to guard it safely. It is the
file you will use to sign your application every time you update, and if you
lose it you cannot upgrade your application in Google Play.
ANDROID DEVELOPMENT PRACTICES:-
This section covers the fundamentals of developing an Android application, explaining
the permissions in the Manifest and how you must always manage your navigation between Activities using the
back stack
Android Fundamentals: When developing an Android app you need to account for which of the four basic
components (Activities, Services, Content Providers, and Broadcast Receivers) of apps you need to include..
Activities:-
Activities are the individual screens in your application. All of the functionality that is
exposed in the UI for that screen lives in the scope of that Activity.
Services:-
Services are components that run in a background thread. Common usages for services
are to hold long-running processes, or for functions that can happen in parallel with the application (playing music
from your library, or updating a web service). Be aware that when you have an application running in the
background it can take processing power from the device, though contrary to popular thought it does not affect
your battery life.
Content Providers:-
Content providers are interfaces to the offline storage that you have within your app. If
you create a suite of applications you may want to have a single point for holding all of your data. You can also
leverage the Content Providers built into the Android OS. The standard set of providers in the OS allows you to get
content from the Calendar, Contacts, Media Store, Messaging, and Voice Mail applications.
Broadcast Receivers:-
Broadcast receivers are components that respond to system messages. You would use a
Broadcast Receiver to catch events like the screen turning off, or the battery reaching a critical level. A common
use for a Broadcast Receiver is for querying the status of the network (Wi-Fi or cellular) so that you can display
the appropriate messaging to the user.