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
-2
votes
2 answers

android getSystemService error with extends BroadcastReceiver

I have 2 activities public class MainActivity extends AppCompatActivity { .............. @Override protected void onCreate(Bundle savedInstanceState) { .............. .............. } } public class IncomingSms extends…
salx32
  • 67
  • 1
  • 1
  • 5
-2
votes
1 answer

reset TextView from two activities in OnReceive method

I have two acitivties and want to reset values in them everyday at 00:00. Question: Is there any way to link two activities to onReceive method of broadcastReceiver so I can update activities(TextView and EditText) from onReceive?
-2
votes
2 answers

automatically sms read not working in android

public class SmsReceiver extends BroadcastReceiver { private static SmsListener mListener; @Override public void onReceive(Context context, Intent intent) { final Bundle data = intent.getExtras(); final Object[] pdus…
-2
votes
1 answer

Broadcast Receiver is called every time

Don't downvote it.. If you think question needs clarification then comment the issue. I want to update my sqlite table at midnight so calling broadcast receiver to hit at midnight automatically i.e. without launching the app. But it is updating…
-2
votes
1 answer

android -how to save sent messages sent via SmsMessage

I'm using SmsMessage to send sms via my application . this is my code : SmsManager sms = SmsManager.getDefault(); sms.sendTextMessage(tel, null, text, null, null); it works fine and I've no problem with sending…
navid abutorab
  • 189
  • 1
  • 2
  • 9
-2
votes
3 answers

Why Toast.maketoast is not working in the BroadcastReceiver class

I am getting the Error message while i am trying to call the Toast.makeText function inside the onReceive function of the BroadcastReceiver type class. This is not a duplicate of another Question because i am calling the show() method and this is…
-2
votes
1 answer

Is it possible to block an email/sms by android programmatically?

I have schedule to make an android application which used to block spam emails (chosen by myself). However, I cannot find any way to do it. Is it possible to block/reject the email using android programmatically? In addition, I found that from…
Jame
  • 3,746
  • 6
  • 52
  • 101
-2
votes
1 answer

Different way to register and unregistered broadcast receiver

I am trying code for LocalBroadcastManager.While register and unregister BroadcastReceiver , I am using below code. Can any one give difference between both way to register and unregister LocalBroadcastManager? First Way: ... //Register…
pRaNaY
  • 24,642
  • 24
  • 96
  • 146
-2
votes
1 answer

how to create application that always run in the background?

I want to create an application that listen to sms and always run in the background. The service must start when the user turn his android on - and always in action until the android device is down. I know only how to create application with GUI (…
-2
votes
1 answer

How to end the outgoing call as soon its dialed

I am trying to end the call the user dialed. Basically I would allow some number that user would be able to dial and call, else all other call would be end up and User would not be able to call other then those numbers. Now the problem is I have…
-2
votes
1 answer

"Parser error" after downloading upgrading in android

I am developing an application for android which on downloading the upgrade prompts the user to install. But it shows "Parser error: There was a problem while parsing the package."after downloading the file successfully. Following is my code to…
-3
votes
2 answers

Intercept android SMS going to default inbox - BroadcastReceiver

I'm developing a SMS based chat application using some Telco APIS. I am receiving SMS only from a particular number and I want to know how I can prevent SMS being sent to the the default inbox of android. Following is the code of my SMS receiver.…
-3
votes
2 answers

Notification Scheduler not working

I am trying to schedule a notification in Future in android. but It gives me the notification just right now. scheduleNotification Method. private void scheduleNotification(Notification notification, long delay) { Intent notificationIntent = new…
-3
votes
2 answers

passing data from service to fragment giving null point

I am trying to get the data from service using BroadcastReceiver and i am able to display that data in the Log but when i try to send the data using the Bundle like this @Override protected void onStart() { myReceiver = new…
-3
votes
1 answer

app crashes when alarm triggers if app is closed

Get Exception : Caused by: android.database.sqlite.SQLiteException: no such table: TABLE_USER_RITUALS (code 1): , while compiling: Select * from TABLE_USER_RITUALS where USER_NAME = 'vxfbb' and RITUAL_NAME = 'Morning Routine' But the…
1 2 3
57
58