Questions tagged as 'broadcastreceiver'

3
answers

Connect android screen

Next, I have a BroadCast and I want it when it runs the phone screen to be turned on! Probably the phone will be in sleep, so I want it to turn on the screen of the device! I think it's simple, but I'm not finding a solution!     
asked by 06.06.2014 / 04:10
2
answers

Capture the moment the cell phone screen was turned on and when it was deleted

Hello!    I am building a project similar to an alarm clock but I am having some difficulties trying to use the broadcastreceiver class. Problem:     I want to capture the date and the exact time that the cell phone screen was lit, that is, if t...
asked by 31.03.2018 / 15:49
1
answer

"java.lang.SecurityException: Permission Denial" on Android 6 Marshmallow (API 23)

I'm trying to register a broadcastreceiver so I can check out a new sms that might arrive on the device. I'm getting an error only in android marshmallow in the following snippet of code from my fragment: public static final String BROA...
asked by 30.03.2016 / 22:28
1
answer

"java.lang.SecurityException: Permission Denial" on Android 6 Marshmallow (API 23)

I'm trying to register a broadcastreceiver so I can check out a new sms that might arrive on the device. I'm getting an error only in android marshmallow in the following snippet of code from my fragment: public static final String BROA...
asked by 30.03.2016 / 22:28
0
answers

Make the application wait for the response of a BroadcastReceiver

I need to send a list of SMS messages. The problem is that when they are too many, they seem to jam the send, locking the function. So I'd like to send one at a time. I'm trying with the class below: public class EnviaSMS extends AsyncTask<...
asked by 16.12.2014 / 18:08
1
answer

BroadCast notification when Android device is sleeping

I have an activity that calls a function from a service class that creates a intent = NEW INTENT("MEU_BROADCAST") and also an AlarmManager . Within the BroadCast class I call an activity that creates a notification. Everything w...
asked by 04.06.2014 / 19:48
1
answer

Run service even though app is not open

I'm creating a wakeup app and in tests I would like it to wake up (in this example it still only vibrates), but I'm not able to make it run in the background and so it does not end up waking up, how can I even make it app has been destroyed it k...
asked by 04.04.2018 / 03:17
1
answer

Capturing events on volume button

I'm trying to record and capture the events on the Android volume buttons in order to start and stop a service. Researching found several solutions, using BroadcastReceiver, but it seems that none is working for me. What I did so far was b...
asked by 02.07.2015 / 19:51
1
answer

How can I within a BroadcastReceiver extending class carry out some change in the graphical interface?

Having an ActivityMain (inherited from Activity) calls a broadcast, and then the Broadcast class is started. But when I perform some action on this broadcast I want to change information from the textView that belongs to the ActivityMain class a...
asked by 26.09.2014 / 18:13
1
answer

How to keep the countdown running in background

I'm trying to do a 24-hour countdown but keep running in the background, because I want to send a notification when 5 hours is missing, so far I've been trying to implement a service with a broacast receiver (I do not quite understand that) , ho...
asked by 20.08.2017 / 02:21