releated to android
-
i am trying to block call in aur application . in which i want that this application run in background while application is closed for this i am using broadcastreciver but this application cannnot work plz help me to build my apps
-
i am trying to block call in aur application . in which i want that this application run in background while application is closed for this i am using broadcastreciver but this application cannnot work plz help me to build my apps
-
****************this is my first java file of my application ***************** package com.collblockinandroid; import java.lang.reflect.Method; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.telephony.TelephonyManager; import android.util.Log; public class CallblockinandroiddemoooActivity extends BroadcastReceiver { Context context = null; private static final String TAG = "Phone on Call"; private ITelephony telephony; @Override public void onReceive(Context context, Intent intent) { Log.v(TAG, "Receving...."); TelephonyManager telephonymanager= (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); try { Class c = Class.forName(telephony.getClass().getName()); Method m = c.getDeclaredMethod("getITelephony"); m.setAccessible(true); telephony = (ITelephony) m.invoke(telephonymanager); telephony.silenceRinger(); telephony.endCall(); } catch (Exception e) { e.printStackTrace(); } } } ********* After that i make a file of aIDL THAT IS GIVEN BY THE NAME ITtelephony************************
package com.collblockinandroid;
public interface ITelephony {
boolean endCall();void answerRingingCall(); void silenceRinger();
}
********************** my menifest file is ********************************************
-
****************this is my first java file of my application ***************** package com.collblockinandroid; import java.lang.reflect.Method; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.telephony.TelephonyManager; import android.util.Log; public class CallblockinandroiddemoooActivity extends BroadcastReceiver { Context context = null; private static final String TAG = "Phone on Call"; private ITelephony telephony; @Override public void onReceive(Context context, Intent intent) { Log.v(TAG, "Receving...."); TelephonyManager telephonymanager= (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); try { Class c = Class.forName(telephony.getClass().getName()); Method m = c.getDeclaredMethod("getITelephony"); m.setAccessible(true); telephony = (ITelephony) m.invoke(telephonymanager); telephony.silenceRinger(); telephony.endCall(); } catch (Exception e) { e.printStackTrace(); } } } ********* After that i make a file of aIDL THAT IS GIVEN BY THE NAME ITtelephony************************
package com.collblockinandroid;
public interface ITelephony {
boolean endCall();void answerRingingCall(); void silenceRinger();
}
********************** my menifest file is ********************************************
-
Please edit the above entry and format it properly between the appropriate <pre> tags so we can read it. Also explain whaere it is failing and what error codes or messages you see.
Sir no error is shown in my application code but problem is that while we run this app then it gives Application not responding Error to the emulator . i cannot reconize that where is problem ..
-
Sir no error is shown in my application code but problem is that while we run this app then it gives Application not responding Error to the emulator . i cannot reconize that where is problem ..