Android setting your device to develpment

In this link you will find a quick guide on how to setup your device for development.
This guide explains how to on windows, ubuntu and mac os x.

After doing this don’t forget to check this post and don’t forget that you will probably need to do:
adb kill-server
adb start-server
If for some reason you have problems with permissions try:
sudo adb kill-server
sudo adb start-server
If you ever get sudo: adb: command not found
try this:
sudo ln -s /home/user/Downloads/Android/android-sdk-linux_x86/platform-tools/adb /usr/local/sbin/adb
where “/home/user/Downloads/Android/android-sdk-linux_x86/platform-tools” is your path to adb
Edit:
Is you are using linux, also read this.
Digg thisBuffer this pageShare on FacebookShare on Google+Share on LinkedInPin on PinterestShare on RedditShare on StumbleUponShare on TumblrTweet about this on Twitter

Android Send Sms Intent

If you ever need to send sms here is a sample code to create the necessary intents:

//case you don't have the number
public static Intent getIntentSms(String message){
Intent it = new Intent(Intent.ACTION_VIEW);
it.putExtra("sms_body", message);
it.setType("vnd.android-dir/mms-sms");
return it;
}

//case you have the number
public static Intent getIntentSms(String message, String number){
Uri uri = Uri.parse("smsto:" + contact);
Intent it = new Intent(Intent.ACTION_SENDTO, uri);
it.putExtra("sms_body", message);
return it;
}

if you need to send the same message to more than one number, just use the char ‘,’ ex: 12345,34567,67890

Digg thisBuffer this pageShare on FacebookShare on Google+Share on LinkedInPin on PinterestShare on RedditShare on StumbleUponShare on TumblrTweet about this on Twitter

Add an icon to application title

In order to add an icon to your android application title you will need to do something like this in your activity:

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

requestWindowFeature(Window.FEATURE_RIGHT_ICON);
// set layout
setContentView(R.layout.main);

// set application title icon
setFeatureDrawableResource(Window.FEATURE_RIGHT_ICON, R.drawable.icon);
}

where R.drawable.icon is the icon you would like to add to your application title.

Digg thisBuffer this pageShare on FacebookShare on Google+Share on LinkedInPin on PinterestShare on RedditShare on StumbleUponShare on TumblrTweet about this on Twitter