broadcastreceiver

Broadcast Receivers in Delphi XE5 Android

假装没事ソ 提交于 2019-12-01 07:17:45
How to use broadcast receivers in Delphi XE5 Android? The documentation is very poor about the Delphi XE5 and Android integration. Currently there is no support in XE5 for broadcast receivers. It is needed in order to get the BlueTooth API implemented, for example. Some attempts can be found here . Update: Markus Humm filed two QC requests to get this working. QC 118435 Provide the ability to inherit from a Java class and QC 118683 Provide Delphi side implementation for Android.BluetoothAdapter . Vote for them! I've written a BroadcastReceiver plug-in for Delphi XE5 that provides such support.

Android BroadcastReceiver not working after install

帅比萌擦擦* 提交于 2019-12-01 06:34:57
Greetings! I'm working on an application that has a BroadcastReceiver listening on "android.intent.action.PHONE_STATE", which is run when the phone state is changed (I used it to run code when an incoming call is detected). This works fine on most of my test phones, but a few don't seem to trigger the receiver at all. However, once these problem phones are restarted everything works as expected. Is there a reason these phones need to be restarted before the BroadcaseReceiver can pick anything up? Is there a way I can detect if it isn't running and manually "start" the BroadcaseReceiver? I'm

Broadcast receiver and pending intent : Show a toast

大兔子大兔子 提交于 2019-12-01 06:29:23
The following is the code for an alarm that has to hit the BroadCast Receiver : Intent intentWithData = new Intent(context, TokenActivity.class); intentWithData.putExtra(Constants.ID,id); intentWithData.putExtra(Constants.POSITION, finalI); PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 007, intentWithData, 0); AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + 5000, pendingIntent); The code for the Broadcast receiver is import android.content.Context; import

Android : Catching Outgoing SMS using ContentObserver or receiver not working

人走茶凉 提交于 2019-12-01 06:20:39
问题 i trying to catch outgoing SMS event using content observer. //TEST OBSERVER ContentObserver co = new SMSoutObserver(new Handler(), getApplicationContext()); ContentResolver contentResolver = getApplicationContext().getContentResolver(); contentResolver.registerContentObserver(Uri.parse("content://sms/out"),true, co); // END TEST OBSERVER and public class SMSoutObserver extends ContentObserver { private Context mCtx; public SMSoutObserver(Handler handler, Context ctx) { super(handler); mCtx =

How to identify the ringing state of outgoing call in android

别等时光非礼了梦想. 提交于 2019-12-01 06:14:02
问题 In my app i want to identify whether the outgoing call state like waiting,received or rejected by other side. I searched a lot in these below links Outgoing call status How to detect answered or rejected state in outgoing call,outgoing call information through android BroadcastReceiver,identify outgoing call connect event But couldn'd find a proper answer.Plz help me.Thanx. 回答1: I know its been a while but i hope to be helpful for someone still looking for a solution! I recently had to work

Close application from broadcast receiver

我的未来我决定 提交于 2019-12-01 06:13:44
I'm new in android programming. I've tried registering broadcast receiver in activity, but my receiver not working when apps onPause. So i found that i need to registering my receiver in manifest. My objective is to close my application for some time after user turn off Wifi. This is my code but its not working. public class ReceiverWifi extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Handler handler = new Handler(); Runnable runnable = new Runnable() { @Override public void run() { MainActivity m = new MainActivity(); m.finish(); } }; if (intent

Can iOS receive broadcasts like Android?

我们两清 提交于 2019-12-01 06:01:59
I would like my app to be informed when a headset/headphones is disconnected from an iOS device after a period of idle time long enough for the app to have been cleaned up (and thus might not be running) similar to how a BroadcastReceiver works in android. I suspect it's not possible but would appreciate any ideas. I have looked into local and push notifications and the NSNotificationCenter . Push notifications aren't appropriate because events happen on the device. It only seems possible to schedule (by specifying a time) local notifications and not create them from system events and

NEW_OUTGOING_CALL not being called on Samsung Galaxy S

北战南征 提交于 2019-12-01 05:55:55
Trying to intercept outgoing calls, and have a solution working well on nexus 1 stock android 2.2 HTC desire 2.2 Moto defy 2.1 But not on the Samsung Galaxy S running 2.1, anyone seen this? <receiver android:name="com.mypackge.OutGoingCallDetection" android:exported="true"> <intent-filter> <action android:name="android.intent.action.NEW_OUTGOING_CALL" android:priority="0" /> </intent-filter> </receiver> <uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" /> Update: the PROCESS_OUTGOING_CALLS is also added. The receiver: public class OutGoingCallDetection extends

How to find out if in Car Mode (Android)?

眉间皱痕 提交于 2019-12-01 05:49:00
问题 is it actually possible to find out via intent (or something else) if the device is currently in Car Mode? I tried to do this with a receiver that has a global variable, however I guess the variable doesn't survive after going through the onReceive ;-) So is there another way? Thanks! 回答1: I got this link after googling for Configuration UI_MODE_TYPE_CAR . Link - http://www.java2s.com/Open-Source/Android/Samples/techbooster/org/jpn/techbooster/sample/uiModeManager.java.htm It mentions

Android BroadcastReceiver not working after install

若如初见. 提交于 2019-12-01 05:46:28
问题 Greetings! I'm working on an application that has a BroadcastReceiver listening on "android.intent.action.PHONE_STATE", which is run when the phone state is changed (I used it to run code when an incoming call is detected). This works fine on most of my test phones, but a few don't seem to trigger the receiver at all. However, once these problem phones are restarted everything works as expected. Is there a reason these phones need to be restarted before the BroadcaseReceiver can pick anything