Questions tagged [android-broadcastreceiver]

BroadcastReceiver is an Android component that responds to system-wide broadcast announcements.

BroadcastReceiver is an Android component that responds to system-wide broadcast announcements.

Many broadcasts originate from the system – for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured.

Applications can also initiate broadcasts – for example, to let other applications know that some data has been downloaded to the device and is available for them to use.

Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.

For more information visit the Android BroadcastReceiver reference or the documentation for the receiver element used in the Android manifest file.

859 questions
-1
votes
1 answer

How to receive SMS?

Am trying to receive incoming SMS on android application but i can't get the coming SMS received, bellow is the code am using. import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import…
AmStack
  • 1
  • 1
-1
votes
1 answer

Are android ordered broadcasts atomic? If not how can atomicity be implemented for such broadcasts?

Suppose there are 4 BroadcastReceivers and there is an application sending Ordered Broadcast to all of them. All four broadcast receivers are in their own separate processes. If something goes wrong in between(e.g something fails in one of the in…
Abhishek Bansal
  • 5,197
  • 4
  • 40
  • 69
-1
votes
1 answer

Camera.takePicture(Camera$ShutterCallback, Camera$PictureCallback, Camera$PictureCallback)' on a null object reference

I watch many Questions and answer on stack overflow but i can't find my problem solution. I try to get captured image directly from camera and give to my background task for edit image and then save to it's original place. My code is: manager =…
-1
votes
1 answer

Android timer,Broadcast Receiver,

Developing a timer application, Have 4 buttons start--Will start the timer stop-- will stop timer pause--will pause timer lap time--will calculate lap time. when button click it s working Good. Now i am Modify the application like timer should…
-1
votes
1 answer

Android: How to start a service on boot completed of MI devices?

In an application, I am trying to implement a service which needs to run every time when device boot process completed. Application unable to broadcast service only in MI devices. Manifest.xml
-1
votes
1 answer

Why Brocast receiver not getting fire?

Below code is working fine upto marshmallow but it not working in from 7.0 I create Brocast receiver for to fetch location every 6 sec. MainActivity.java private PendingIntent getPendingIntent() { Intent intent = new Intent(this,…
demo
  • 672
  • 3
  • 9
  • 34
-1
votes
1 answer

Most frequently triggered android receiver?

What is the most frequently triggered android intent action that my app could have a BroadcastReceiver listening for without a service running in order to receive it? Background I have a foreground service that needs to run roughly whenever the user…
CamHart
  • 3,825
  • 7
  • 33
  • 69
-1
votes
2 answers

Always running Broadcast Receiver in API 26

I am facing some problems with the implementation of an always running Broadcast Receiver on API 26. First of all, my Intent Filters are not on the whitelist of Oreo's no restriction-Intent Filters. I tried wrapping my Broadcast Receiver in a…
-1
votes
1 answer

Android: Activity overlap another app

I need some help to guide me in a project, i need that my app recognize when another app get started and then my activity shows up. I researched about service, intentservice and broadcastreceiver. But i dont know yet how to execute my idea. Can you…
-1
votes
2 answers

BroadCast Receiver onReceive not called

I am trying to send a broadcast from a service but it is not received in the receiver. Following is my code Bluetooth Service public class BluetoothService extends Service { public final static String TAG =…
-1
votes
1 answer

notification when user don't use app 24 hours

Hellow. I develop app in which need show local notification when user don't use app 24 hours. My code: MainActivity @Override protected void onDestroy() { super.onDestroy(); Calendar calendar = Calendar.getInstance(); Intent myIntent =…
-1
votes
1 answer

keep your app runing in the background

I am working on an AppLocker which is going to block access to other apps. It works fine when it's running but when I close it, clients will be able to have access to apps again, which means my app is useless. I want to launch it on start up and…
-1
votes
1 answer

RuntimeException Can't create handler inside thread that has not called Looper.prepare()

I'm trying to make a volley request when I receive LocalBroadcast message. But I'm getting this RuntimeException. I tried using thread but still getting the same error. Should I use something else? I'm getting the exception in the method…
Somnath Pal
  • 137
  • 1
  • 4
  • 10
-1
votes
1 answer

Read OTP/SMS in MI device not working (Android)

I have integrated Auto read OTP in my code and it's working fine except in MIUI devices. BroadcastReceiver never wake up in case of MI devices when sms is received. After some efforts I think MI devices runs on its Permission Manager where all…
Kapil Rajput
  • 11,429
  • 9
  • 50
  • 65
-1
votes
3 answers

How to run broadcast receiver for every one hour?

I have created broadcast receiver inside Service and this broadcast receiver is running frequently .but i want run this broadcast receiver for every one hour.without disturbing service .any suggestion? private BroadcastReceiver mBatInfoReceiver =…
Karthik
  • 102
  • 13