Most voted "broadcastreceiver" questions
30 questions
Sort by count of
-
11
votes1
answer2979
views"java.lang.Securityexception: Permission Denial" on Android 6 Marshmallow (API 23)
I’m trying to register a broadcastreceiver so I can check a new sms that might arrive on the device. I’m getting an error only on android marshmallow in the following snippet of my code: public…
-
7
votes1
answer782
viewsNotification at 0h00 without starting application
I would like to notify the user that he has an expense that expires the next day, but without the need for the application to be running, currently I have a code that notifies from the moment I…
-
6
votes1
answer51
viewsDetect implicit Intent action when the Android Operating System changes the time manually
I need to detect in my application when user changes system time manually. How do I do this? For example: If user restarts the device I can detect this event with on my Broadcast receiver so: if…
-
4
votes3
answers360
viewsAlarms are lost when mobile is turned off and on!
How to make the alarms not get lost? Ex: if I create one AlarmManager who calls a Broadcast, if I restart(turn off/on) the mobile phone alarm is no longer triggered.…
-
4
votes2
answers498
viewsService versus Broadcastreceiver
What’s the difference, on Android, between Service and Broadcastreceiver? How long a Service can run (running)? How long can a Broadcastreceiver run (running)? I can create notifications via…
-
3
votes4
answers1275
viewsHow to identify changing the state of connectivity to the Internet to perform a method when connecting?
I’m trying to implement this train and I’m not getting it. I wanted to do the same thing as the colleague who opened the topic, but I could not even follow these examples. I have some questions: In…
-
2
votes1
answer1333
viewsHow to show the content of a received SMS on Android in a text dialog?
I’m developing an Android app that sends an SMS request to a remote device and receives back a reply, also via SMS, which should be presented to the user. To receive the SMS I used the following…
-
2
votes1
answer280
viewsWhy is Broadcastreceiver called several times and always with the same "extra"?
I have an app that sends text messages on android, and a Broadcast to capture errors if I can’t send to the recipient. If you cannot send a message, I capture the object and write to the database…
-
2
votes1
answer414
viewsUsing Broadcast Receiver with Downloadmanager
I’m learning to make use of the DownloadManager with BroadcastReceiver to know when the download is completed. The problem: let’s assume that I will download 2 Pdfs on a page, I record 2 Receiver,…
-
1
votes1
answer1503
viewsBroadcast notification when Android device is asleep
I have a Activity calling a function of a class (service) that creates a intent = NEW INTENT("MEU_BROADCAST") and also a Alarmmanager. Within the class Broadcast I call a Activity creating a…
-
1
votes3
answers1027
viewsConnect android screen
Next, I have a BroadCast and I want when it runs the screen of the mobile phone to be turned on! The phone will probably be in Sleep, so I want him to turn on the screen of the device! I think it’s…
-
1
votes0
answers532
viewsMake the application wait for the answer of a Broadcastreceiver
I need to send a list of SMS messages. The problem is that when there are many, they seem to jam the sending, locking the function. So I’d like to send one at a time. I’m trying with the class…
-
1
votes2
answers112
viewsCapture the moment the mobile screen was lit and when it was deleted
Hello ! I’m building a project similar to an alarm clock but I’m having a hard time trying to use the broadcastreceiver class. Problem: I want to capture the date and the exact time that the mobile…
-
1
votes1
answer67
viewsRun service even if the app is not open
I am creating an alarm clock app and in the tests I would like it to wake up (in this example it still vibrates), but I am not able to make it run in the background and so does not end up awakening,…
android services broadcastreceiver android-alarmmanagerasked 6 years, 7 months ago Eduardo Rafael Moraes 710 -
0
votes1
answer73
viewsStartactivity inside Broadcastreceiver
I want to go to another Victoria when I enter onReceive of my receiver, but always stops working on startActivity, the code I’m making is like this: @Override public void onReceive(Context context,…
-
0
votes1
answer598
viewsCapture events on volume button
I’m trying to record and capture events on the volume buttons of Android, so I can start and stop a service. Researching I found several solutions using Broadcastreceiver, but it seems that none is…
-
0
votes1
answer155
viewsKnowing if an app is open through a Broadcastreceiver
I have a BroadcastReceiver that displays a notification to the user! But if the user has the app open (with the screen active), I would like to cancel the notification! Is there any way to find out…
-
0
votes1
answer656
viewsHow can I within a class extending from Broadcastreceiver make any changes to the graphical interface?
Having an Activitymain(inherits from Activity) calls a broadcast, and then the Broadcast class is started. But when performed some action in this broadcast I want to change information from the…
-
0
votes1
answer1201
viewsDynamic notifications, through parameters, on Android
I want to create a dynamic notification on Android, where I can change the title and the text that is displayed, through parameters. I’m actually doing it this way: Home class. @Override protected…
-
0
votes1
answer379
viewsInflate a warning in the view from a Broadcastreceiver
I have an application where it is necessary to monitor, and warn the user when he is not available with the internet. To solve this, I created a Broadcastreceiver and show a Toast when this…
-
0
votes1
answer138
viewsBroadcastreceiver ACTION_SETTINGS. Does not intercept
Good evening everyone. I would like my application to be called when the user clicked on "Settings" on his device. So I tried to use one Broadcastreceiver to intercept the…
-
0
votes0
answers641
viewsHide the APP icon
Good afternoon, you guys. I need to create a service type APP, no icon or any trace of it running. I’ve managed to hide everything I need and everything works fine. However, I am using…
-
0
votes1
answer214
viewsBroadcast Receiver with Firebase
I’m in need and I’ve searched a lot, but not yet figure out how to do, I have a base in google’s firebase-database that is updated every 10 minutes, when a new information arrives in firebase the…
-
0
votes1
answer242
viewsLose value in getIntent()
My problem is this... I have a routine of notifications that the user click on the notification screen, open a new Activity. In this new Activity I show some information that I search in the…
android android-activity intent broadcastreceiver android-alarmmanagerasked 8 years, 3 months ago Joel Messias Do Nascimento 103 -
0
votes1
answer178
viewsHow to keep the countdown running in the background
I’m trying to do a countdown of 24 hours but keep running in the background, because I want to send a notification when it’s 5 hours, what I got so far was trying to implement a service with…
-
0
votes0
answers61
viewsBroadcastreceiver is not working
My Broadcastreceiver isn’t working, I don’t know what’s wrong, in my Manifest there’s this <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission…
-
0
votes1
answer47
viewsFATAL EXCEPTION main when using service on android
Good night ! I’m trying to generate a service that can identify when the screen of the mobile phone is erased or access, so I followed some tips to get to this point that is a simple test code, but…
java android broadcastreceiver android-serviceasked 6 years, 7 months ago Eduardo Rafael Moraes 710 -
0
votes0
answers15
viewsNullpointerexception when displaying Notification with Pendingintent and Broadcastreceiver
I am consuming an API and called Broadcastreceiver whenever the user connects to the internet. However, when displaying the notification is appearing: "java.lang.Nullpointerexception: Attempt to…
-
0
votes0
answers118
viewsMultiplos Broadcast Receiver
I am writing an Android app and need to recognize various system status like connection , battery status and some other, my doubt would be, how to create a function for that? i created the following…
-
0
votes1
answer38
viewsOpen Alertdialog in current Activity for an already finished android
I’m making a game, in the app as soon as it loses connection to the internet it has to open a Alertdialog in the current Activity, but I’m not getting. alertDialog opens only on the Activity from…