android-broadcastreceiver

Broadcastreceiver for a downloaded image

喜你入骨 提交于 2021-02-08 10:14:51
问题 Basically I want to set a Broadcastreceiver that gets triggered when the user downloads an image into gallery/phone from chrome, facebook, twitter..etc when the photo is finished downloading , and the actions is triggered, I want access to the downloaded image for extra work such as editing and stuff..! I'm thinking this can be accomplished by Broadcastreceiver , that listens for the image and then do the actions that needed..! I've tried to search for action to be added in the Manifest

Broadcast receiver onReceive() is not called

旧城冷巷雨未停 提交于 2021-01-29 04:16:49
问题 Broadcast receiver mBroadcastReceiver = object : BroadcastReceiver() { override fun onReceive(context: Context, intent: Intent) { Log.i(TAG,"contact list populate broadcast") var action = intent.action Log.v("Action is ",action) when (action) { GetContactListFromServer -> { println("Get contact list") } } } } val filter = IntentFilter(GetContactListFromServer) this.registerReceiver(mBroadcastReceiver, filter) This is how I am sending broadcast val i = Intent(ContactListActivity.Obz

Broadcast receiver with wifi scan not working

99封情书 提交于 2021-01-28 12:23:10
问题 I have the following code in a service which is called with an AlarmManager (this works well) but when when I start the wifi scan (which returns true) I never receive the results in the BroadcastReceiver I created: public class WifiCheckerService extends IntentService { WifiManager wifiManager; List<Wifi> savedWifis; List<Wifi> wifisInRange; List<ScanResult> wifisInRangeResults; BroadcastReceiver broadcastReceiver; public WifiCheckerService() { super("WifiCheckerService"); } @Override public

Broadcast receiver for Phone State changed not working

一个人想着一个人 提交于 2020-08-25 07:42:15
问题 i have created a broadcast receiver for Phone state change. but the broadcast is not working. i have been trying from couple of hours and tried 2,3 solutions but still its not working. other guys over internet have same code and the is working fine for them. i don't know where i am making mistake. need your help! Here are my manifest File <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="veclar.map.callandsmsblocking"> <uses

BroadcastReceiver not firing on notification action click

被刻印的时光 ゝ 提交于 2020-06-16 05:06:48
问题 I am trying to create a simple notification with a button (action) defined to it. I have managed to display it properly and create a PendingIntent for my action. I have also created a BroadcastReceiver which is supposed to be called when my action is clicked. But it's onReceive() method does not get called. I have no idea why. I also registered BroadcastReceiver in AndroidManifest.xml MainActivity.java public class MainActivity extends AppCompatActivity { @Override protected void onCreate

Backgroundservice is running, but not working (FileObserver)

♀尐吖头ヾ 提交于 2020-05-15 21:46:05
问题 I want to run a Backgroundservice (FileObserver) that will look for any filechanges in the system (CREATE, DELETE, MOVE, ...). When I start my application it works a few seconds and logs everything fine. For example at taking a picture by the camera it logs that. After a few seconds the service is still listed in Settings => Developer Options => Running Services but does not work and log anything anymore. Android Version: 7.0 Device: Samsung Galaxy S7 Edge I copied the code from Niza Siwale's

Android Broadcast Receiver is not working in background

烂漫一生 提交于 2020-05-14 07:42:13
问题 I have 2 Android mobile cellphones with different Android versions. The first cellphone is running Kitkat and the second one Nougat. I'm currently using the following code. After 5 or 7 hours the android application is not detecting events anymore. Can someone please help me out? package com.doct.patients.Broadcast; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.widget.Toast; public class smsReceiver extends

Android Broadcast Receiver is not working in background

心不动则不痛 提交于 2020-05-14 07:40:08
问题 I have 2 Android mobile cellphones with different Android versions. The first cellphone is running Kitkat and the second one Nougat. I'm currently using the following code. After 5 or 7 hours the android application is not detecting events anymore. Can someone please help me out? package com.doct.patients.Broadcast; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.widget.Toast; public class smsReceiver extends