Questions tagged [sticky-broadcast]
11 questions
2
votes
0 answers
How to make android start my application automatically when battery is fully charged?
My question is similar to this one:
battery receiver fully charged doesnt work
. That question has no answers.
Here are the approaches I have thought of so far:
Approach 1: Register a BroadcastReceiver in the AndroidManifest.xml for…

user3760100
- 679
- 1
- 9
- 20
2
votes
1 answer
What would be an example of a mechanism that will replace Sticky Broadcasts?
Sticky Broadcasts have been deprecated. The documentation says:
This method was deprecated in API level 21. Sticky broadcasts should not be used.
They provide no security (anyone can access them), no protection (anyone can modify them), and many…

user2135579
- 21
- 2
2
votes
1 answer
Adding security to sticky broadcast
As per android developers documentation:
http://developer.android.com/reference/android/content/Context.html#sendStickyBroadcast(android.content.Intent)
There is no provision to provide a user defined permission to secure a sticky broadcast.
I have…

Vicky Kapadia
- 6,025
- 2
- 24
- 30
1
vote
0 answers
Sticky broadcast giving security exception in Android for work in Android P
I am using sticky broadcast in my application and I have included the following permission in my manifest.
uses-permission android:name="android.permission.BROADCAST_STICKY"
The app is working absolutely fine when installed normally in personal…

Ankit Mittal
- 179
- 5
1
vote
0 answers
ConnectivityManager.CONNECTIVITY_ACTION -> sticky intent on all devices / os versions?
I tested that registering ConnectivityManager.CONNECTIVITY_ACTION ("android.net.conn.CONNECTIVITY_CHANGE") sends sticky Intent. Can we be sure that we receive this sticky Intent on all devices and os versions? And will it be available in the future…

AppiDevo
- 3,195
- 3
- 33
- 51
1
vote
1 answer
A sticky broadcast intent for a bluetooth headset in android/or an alternative
I am working on a app where I require to know if there is a bluetooth headset connected. I have created a broadcast receiver that receives the broadcast intents if we connect to the bluetooth headset while the app is on. on the other hand if a…

Avinash Joshi
- 1,307
- 8
- 25
1
vote
3 answers
How to replace sendStickyBroadcast in Android?
As you know,
sendStickyBroadcast method is now deprecated. How to replace it?
Of course I can use sendBroadcast but then it will be not sticky.

sofi37
- 323
- 1
- 4
- 15
1
vote
1 answer
Android update app across app restarts using DownloadManager (avoid downloading multiple times)
Iam trying to update my app by downloading the apk using download manager. I have registered broadcast receiver to listen to DownloadManager.ACTION_DOWNLOAD_COMPLETE in MainActivity and open the apk in onReceive method.
Following is the code:
public…

xxxxx
- 1,918
- 2
- 17
- 22
1
vote
1 answer
How to ensure any of application's Activities which is currently in foreground to receive a message
I want any of application's Activities which is currently in foreground to receive a message.
So I'm sending a LocalBroadcastManager to distribute a message across my application. Then my idea was to have BaseActivity which all other Activities must…

Marian Paździoch
- 8,813
- 10
- 58
- 103
0
votes
0 answers
If I want to react to an old sticky Intent, do I need to call the BroadcastReceiver manually?
If I want to react to an old sticky Intent, do I need to call the BroadcastReceiver manually, as such, or will the onReceive method be called implicitly in registerReceiver() already?
Intent stickyIntent = registerReceiver(broadcastReceiver,…

JohnyTex
- 3,323
- 5
- 29
- 52
0
votes
1 answer
Sticky broadcasts rebroadcast
I want to change the extras of a sticky broadcast, does another call to sendStickyBroadcast with the same intent creates a new sticky broadcast or replaces the previous one?
Also, I use sticky broadcast to maintain a state of some property and share…

Ofek Ron
- 8,354
- 13
- 55
- 103