broadcastreceiver

Alarm not accessing BroadcastReceiver

会有一股神秘感。 提交于 2019-12-24 07:25:50
问题 I've got a timepicker to set the alarm public class TimePickerFragment : DialogFragment, TimePickerDialog.IOnTimeSetListener { public static readonly string TAG = "MyTimePickerFragment"; Action<DateTime> timeSelectedHandler = delegate { }; public static TimePickerFragment NewInstance(Action<DateTime> onTimeSelected) { TimePickerFragment frag = new TimePickerFragment(); frag.timeSelectedHandler = onTimeSelected; return frag; } public override Dialog OnCreateDialog(Bundle savedInstanceState) {

Android Permission Denial: broadcasting Intent

◇◆丶佛笑我妖孽 提交于 2019-12-24 04:32:17
问题 I really do not know what is wrong, but my if widget is update by system by "APPWIDGET_UPDATE" it throws following exception. I tried several things, exporting receiver (true/false), I tried it on emulators and real phones, but it is same. I added several intent-filters , but it did not work. 11-06 20:10:10.279: W/ActivityManager(61): Permission denied: checkComponentPermission() reqUid=1000 11-06 20:10:10.279: W/ActivityManager(61): Permission Denial: broadcasting Intent { act=android

Android Permission Denial: broadcasting Intent

别等时光非礼了梦想. 提交于 2019-12-24 04:31:09
问题 I really do not know what is wrong, but my if widget is update by system by "APPWIDGET_UPDATE" it throws following exception. I tried several things, exporting receiver (true/false), I tried it on emulators and real phones, but it is same. I added several intent-filters , but it did not work. 11-06 20:10:10.279: W/ActivityManager(61): Permission denied: checkComponentPermission() reqUid=1000 11-06 20:10:10.279: W/ActivityManager(61): Permission Denial: broadcasting Intent { act=android

Fetching Call duration from Calllog after call ends using BroadcastListener

余生长醉 提交于 2019-12-24 04:23:19
问题 I need to try and get the call duration after a call has ended. I have a broadcast listener which using telephony manager keeps track of the phone states, that is 'offhook', 'idle' and all. Using this receiver i can find out when a outgoing call has been completed. Upon completion of a call, i start a service to fetch the call duration of the last call. However, the value that i get is that of the previous call and not the one that just completed. I think i'm fetching from the calllog DB even

Native phone dialer ghost appears in recent apps after calling setResultData(null);

谁说我不能喝 提交于 2019-12-24 03:09:13
问题 Whenever I try to use my own app to handle an Outgoing call, I see a zombie/ghost/second native phone dialer appear in the recent apps. This seems tied to calling setResultData(null) in my receiver. Nexus 4 (Android 4.3) I've add the correct permissions <uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" /> And registered my receiver as follows <receiver android:name=".OutGoingCallReceiver"> <intent-filter> <action android:name="android.intent.action.NEW_OUTGOING_CALL" /

Native phone dialer ghost appears in recent apps after calling setResultData(null);

可紊 提交于 2019-12-24 03:09:02
问题 Whenever I try to use my own app to handle an Outgoing call, I see a zombie/ghost/second native phone dialer appear in the recent apps. This seems tied to calling setResultData(null) in my receiver. Nexus 4 (Android 4.3) I've add the correct permissions <uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" /> And registered my receiver as follows <receiver android:name=".OutGoingCallReceiver"> <intent-filter> <action android:name="android.intent.action.NEW_OUTGOING_CALL" /

close() was never explicitly called on database

ε祈祈猫儿з 提交于 2019-12-24 03:03:45
问题 I need to store sms in a sqlite database, when one is received. I'm using these classes: DBHelper.java public class DBHelper extends SQLiteOpenHelper { private static final String DB_NAME = "my_db"; private static final int DB_VERSION = 1; public DBHelper(Context context, String name, CursorFactory factory, int version) { super(context, DB_NAME, factory, DB_VERSION); } public DBHelper(Context context) { super(context, DB_NAME, null, DB_VERSION); } public String getName(){ return DB_NAME; }

Android: Why I am not receiving the BOOT_COMPLETED intent?

天涯浪子 提交于 2019-12-24 02:42:33
问题 I am testing on an physical device (SAMSUNG ACE GT S5830i) But I am not receiving the BOOT_COMPLETED intent therefore the service is not Receiver is not starting This is the code I am using. public class BootCompleteReceiver extends BroadcastReceiver { static final String TAG = "InfoService.BroadcastReceiver"; @Override public void onReceive(Context context, Intent intent) { if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) { Log.e(TAG, "System boot notification received."); Intent

AlarmManager doesn`t start BroadcastReceiver

杀马特。学长 韩版系。学妹 提交于 2019-12-24 02:34:24
问题 I am trying to use BroadcastReceiver and AlarmManager to set a one-shot alarm. I have no idea why isn`t it working. What am I doing wrong? I have no exceptions, no logs about, no suggestions from IDE, everything seems fine, but onReceive method in my BroadcastReceiver is never called. public void setAlarm(Context mContext) { AlarmManager alarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE); Intent intent = new Intent(mContext, AlarmReceiver.class); PendingIntent

how to correct a 'Instrumentation run failed due to 'java.lang.IllegalArgumentException''

∥☆過路亽.° 提交于 2019-12-24 02:31:05
问题 I am working on a course project that deals with notifications,Asynctasks, and broadcast Recievers. i have three tests to run, the first test fails with the stack trace error of: Test failed to run to completion. Reason: 'Instrumentation run failed due to 'java.lang.IllegalArgumentException''. Check device logcat for details the Logcat is huge. if you can tell me what i might be looking for i can narrow it with the tag: function. the other two tests run just fine. below is the first class