Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 12th, 2012  |  syntax: None  |  size: 0.86 KB  |  hits: 23  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. making an activity with a transparent view over incoming call in android
  2. public class CustomBroadcastReceiver extends BroadcastReceiver {
  3.  
  4. private static final String TAG = "CustomBroadcastReceiver";
  5.  
  6. @Override
  7. public void onReceive(Context context, Intent intent) {
  8.       //  Log.v(TAG, "WE ARE INSIDE!!!!!!!!!!!");
  9.     TelephonyManager telephony = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
  10.         CustomPhoneStateListener customPhoneListener = new CustomPhoneStateListener();
  11.  
  12.     telephony.listen(customPhoneListener, PhoneStateListener.LISTEN_CALL_STATE);
  13.     Bundle bundle = intent.getExtras();
  14.     String phoneNr= bundle.getString("incoming_number");
  15.     Log.v(TAG, "phoneNr: "+phoneNr);
  16.     TestAsyncTask myATask = new TestAsyncTask();
  17.     myATask.execute("one", "two", "three", "four");
  18.     //someActivity some = new someActivity();
  19.  
  20. }