RUN COMMAND PROMPT AS ADMINISTRATOR.

1.Locate your debug.keystore file
"C:\Users\bhushan\.android\debug.keystore"

2.Locate keytool.exe in Java\bin folder


C:\Program Files\Java\jre7\bin>keytool -v -list -alias androiddebugkey -keystore C:\Users\bshirsath\.android\debug.keystore -storepass android -keypass android Alias name: androiddebugkey Creation date: Mar 8, 2012 Entry type: PrivateKeyEntry Certificate chain length: 1 Certificate[1]: Owner: CN=Android Debug, O=Android, C=US Issuer: CN=Android Debug, O=Android, C=US Serial number: 1f5b8c95 Valid from: Thu Mar 08 17:51:52 IST 2012 until: Sat Mar 01 17:51:52 IST 2042 Certificate fingerprints: MD5: 6E:E7:47:2E:A7:07:8A:42:77:89:A8:83:C7:A6:53:87 SHA1: 1D:99:2B:0E:D3:2F:DE:12:92:CE:86:EE:5A:D2:99:80:28:F7:B6:22 SHA256: 30:0B:FC:40:7F:57:9F:51:FF:60:94:B9:CE:27:C1:7A:9D:EF:F7:14:C8: 36:B0:E8:F4:11:13:23:B1:67:17:08 Signature algorithm name: SHA256withRSA Version: 3 Extensions: #1: ObjectId: 2.5.29.14 Criticality=false SubjectKeyIdentifier [ KeyIdentifier [ 0000: DF 53 60 E5 59 3A 8C 07 EA E1 A2 3F 00 57 45 DD .S`.Y:.....?.WE. 0010: DF 29 08 BA .).. ] ] C:\Program Files\Java\jre7\bin>



4.Get a key for the Google Maps Android API v1:
https://developers.google.com/maps/documentation/android/v1/maps-api-signup

5.To register for a Google Maps Android API v1 Key, follow these steps:
-->If you don't have a Google account, use the link on the page to set one up.
-->Paste the MD5 key
-->Click "Generate API Key"


Generated key:0kVayCORItzMtF85IkONrJY0ECuVYdTcAuUE4HQ


6.Add API KEY to your application's MapView objects:

android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="EXAMPLE_MAPS_API_KEY_STRING" />

 7.Add

package="com.example.package.name">
...


...


8.Sign your application with the certificate that corresponds to the Maps API Key referenced in your MapView elements.

Hello Friends
These are some of the interesting Android phone's secret codes which gives you system ,firmware,hardware,network etc related information




Android Phone Information Secret Code: *#*#4636#*#*

To get the information of your phone and battery. including Phone information, Battery information, Battery history, and Usage statistics.



Android Phone WLAN, GPS and Bluetooth Test Secret Codes:

*#*#232339#*#* OR *#*#526#*#* OR *#*#528#*#* ¨C WLAN test (Use "Menu" button to start various tests)

*#*#232338#*#* ¨C Shows WiFi MAC address

*#*#1472365#*#* ¨C GPS test

*#*#1575#*#* ¨C Another GPS test

*#*#232331#*#* ¨C Bluetooth test

*#*#232337#*# ¨C Shows Bluetooth device address

Android Phone GTalk Secret Codes: *#*#8255#*#*

It can be used to launch GTalk Service Monitor.


Android Phone Camera Information Secret Code: *#*#34971539#*#*

It is used to get information about the camera. It includes following 4 menus: Update camera firmware in image, Update camera firmware in SD card, Get camera firmware version, and Get firmware update count. You should never use the first option otherwise your phone camera may stop working, and there is really no reason to update the camera firmware anyway.





Android Phone Reset Secret Code: *#*#7780#*#*

To reset your Android phone back to factory data. It will delete the things including Google account settings stored in your phone, System and application data and settings, and Downloaded applications too. I wont delete, including current system software, bundled applications, SD card files e.g. photos, music files.

Android Phone Factory Format Secret Code: *2767*3855#

It is used for factory format, which will delete all files and settings, including the internal memory storage. It will also reinstall the firmware.


Android Phone Firmware version information Secret Codes:

*#*#4986*2650468#*#* ¨C PDA, Phone, H/W, RFCallDate

*#*#1234#*#* ¨C PDA and Phone

*#*#1111#*#* ¨C FTA SW Version

*#*#2222#*#* ¨C FTA HW Version

*#*#44336#*#* - PDA, Phone, CSC, Build Time, Changelist number

Android Phone Factory Tests Secret Codes:

*#*#0283#*#* ¨C Packet Loopback

*#*#0*#*#* ¨C LCD test

*#*#0673#*#* OR *#*#0289#*#* ¨C Melody test

*#*#0842#*#* ¨C Device test (Vibration test and BackLight test)

*#*#2663#*#* ¨C Touch screen version

*#*#2664#*#* ¨C Touch screen test

*#*#0588#*#* ¨C Proximity sensor test

*#*#3264#*#* ¨C RAM version


Android Phone Secret Code: *#*#7594#*#*

It will change the "End Call / Power" button action on your phone. By default, if you long press the button, it shows a screen asking you to select any option from Silent mode, Airplane mode and Power off. You can change this action using this code. You can enable direct power off on this button so you don't need to waste your time in selecting the option.

Android Phone Backup Secret Code: *#*#273283*255*663282*#*#*

It opens a File copy screen where you can backup your media files e.g. Images, Sound, Video and Voice memo.

Android Phone Service mode Secret Code: *#*#197328640#*#*

It can be used to enter into Service mode. You can run various tests and change settings in the service mode.




Step 1: Create an XML in the drawable folder and name it selected_item.xml (or any another name you want but to be suggestive). The code in this xml will be:

<shape android="http://schemas.android.com/apk/res/android" shape="rectangle"><br /> <solid color="#80000000"><br /> </solid></shape>



The color="#80000000" is transparent black.
Step 2: Create an XML again, in the drawable folder an name it not_selected.xml. The code in this xml will be:


<shape android="http://schemas.android.com/apk/res/android" shape="rectangle">
<solid color="#80ffffff">
</solid></shape>


The color="#80ffffff" is transparent white.

Step 3 Create an XML again :) in the drawable folder and name it button_selector.xml. The code in this xml will be:

<selector android="http://schemas.android.com/apk/res/android">
<item drawable="@drawable/selected" state_focused="false" state_pressed="true">
<item drawable="@drawable/not_selected">
</item></item></selector>


Step 4 In the xml file where you make the button put this:

android:background="@drawable/button_selector"


AlarmManager class provides access to the system alarm services. These allow you to schedule your application to be run at some point in the future. When an alarm goes off, the Intent that had been registered for it is broadcast by the system, automatically starting the target application if it is not already running. 

In this exercise, a scheduled alarm of 10 seconds will start a service, MyAlarmService. 



 <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:orientation="vertical"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

>

<TextView

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="@string/hello"

/>

<Button

android:id="@+id/startalarm"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="Start"

/>

<Button

android:id="@+id/cancelalarm"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="Cancel"

/>
</LinearLayout>
AndroidAlarmService.java, the main activity

package com.shir60bhushan.AndroidAlarmService;



import java.util.Calendar;



import android.app.Activity;

import android.app.AlarmManager;

import android.app.PendingIntent;

import android.content.Intent;

import android.os.Bundle;

import android.os.SystemClock;

import android.view.View;

import android.widget.Button;

import android.widget.Toast;



public class AndroidAlarmService extends Activity {



private PendingIntent pendingIntent;





/** Called when the activity is first created. */

@Override

public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

    setContentView(R.layout.main);

    Button buttonStart = (Button)findViewById(R.id.startalarm);

    Button buttonCancel = (Button)findViewById(R.id.cancelalarm);



    buttonStart.setOnClickListener(new Button.OnClickListener(){



 @Override

 public void onClick(View arg0) {

  // TODO Auto-generated method stub



  Intent myIntent = new Intent(AndroidAlarmService.this, MyAlarmService.class);

  pendingIntent = PendingIntent.getService(AndroidAlarmService.this, 0, myIntent, 0);



           AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);



           Calendar calendar = Calendar.getInstance();

           calendar.setTimeInMillis(System.currentTimeMillis());

           calendar.add(Calendar.SECOND, 10);

           alarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pendingIntent);

       

  Toast.makeText(AndroidAlarmService.this, "Start Alarm", Toast.LENGTH_LONG).show();

 }});



    buttonCancel.setOnClickListener(new Button.OnClickListener(){



 @Override

 public void onClick(View arg0) {

  // TODO Auto-generated method stub

  AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);

  alarmManager.cancel(pendingIntent);



           // Tell the user about what we did.

           Toast.makeText(AndroidAlarmService.this, "Cancel!", Toast.LENGTH_LONG).show();

 }});
}
}




this the MyAlarmService.java service for managing and  triggering the alarm


package com.Shir60bhushan.AndroidAlarmService;



import android.app.Service;

import android.content.Intent;

import android.os.IBinder;

import android.widget.Toast;



public class MyAlarmService extends Service {



@Override

public void onCreate() {

// TODO Auto-generated method stub

Toast.makeText(this, "MyAlarmService.onCreate()", Toast.LENGTH_LONG).show();

}



@Override

public IBinder onBind(Intent intent) {

// TODO Auto-generated method stub

Toast.makeText(this, "MyAlarmService.onBind()", Toast.LENGTH_LONG).show();

return null;

}



@Override

public void onDestroy() {

// TODO Auto-generated method stub

super.onDestroy();

Toast.makeText(this, "MyAlarmService.onDestroy()", Toast.LENGTH_LONG).show();

}



@Override

public void onStart(Intent intent, int startId) {

// TODO Auto-generated method stub

super.onStart(intent, startId);

Toast.makeText(this, "MyAlarmService.onStart()", Toast.LENGTH_LONG).show();

}



@Override

public boolean onUnbind(Intent intent) {

// TODO Auto-generated method stub

Toast.makeText(this, "MyAlarmService.onUnbind()", Toast.LENGTH_LONG).show();

return super.onUnbind(intent);

}
}



Finally Add the service declaration in the manifest file of the application

<service android:name=".MyAlarmService" />