Hi guys,
I want to write an App that monitors my paired bluetooth connection in the following way:
If a file comes from a paired source it should be stored. If no file was passed and the bluetooth connection breaks down, my app shall store a dummy file.
Storing a file works great, my main issue is how to run this whole thing without h...
Hi!
I'm currently trying to catch a broadcast message with the MovieView class, already added the filter in the Manifest
//In MovieView
private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
Log.i(T...
I am trying to launch the Main Activity from a broadcast receiver. Can anyone guide me as to how I can do it? I always get "Process is Bad" message.
Thanks
...
Hey guys,
during my development in android I've missed a function that can log every broadcast intent that occur. Sometimes it had been very useful to have a function like that...
I'm also wondering how to trigger those broadcast intents manually on the emulator.
Is there an entire overview of available broadcast intents?
Would be gre...
I am trying to use a sendOrderedBroadcast in my Android app.
I want to be able to send the Intent from one of my applications to another and I then want to get data back from the Application that recieves the Intent, in this case a boolean true or false.
Here is the current code:
Intent i = new Intent();
i.setAction(GlobalData...
Hey,
i want receive all start app intents (i think MAIN/LAUNCHER, see below) to log how often i used the application. So i do not want create an activity... I tried several receiver blocks, but for now nothing works:
with, without priority, only the action, both, only the category and so on..
<receiver android:name=".Receiver" android...
Hi,
I have seen several examples on how to implement a BroadCastReceiver, but how should I implement a Service who has to react on some pending Intent (for example incoming phone call)...
Actually I was wondering about the same "prbolem" but in an Activity..
You obviously have a class which extends a Service 9or an Activity) so it cannot...
I have an Android application with a main activity that is the tabhost. I'm adding multiple tabs to the tabhost with an intent to several activities.
My problem is that these activities are not created (onCreate is not called) until I click on the tab. This is a problem because I need to register broadcastreceivers: there may be broadca...
I have this code
Calendar c = new GregorianCalendar();
c.add(Calendar.DAY_OF_YEAR, 1);
c.set(Calendar.HOUR_OF_DAY, 23);
c.set(Calendar.MINUTE, 22);
c.set(Calendar.SECOND, 0);
c.set(Calendar.MILLISECOND, 0);
// We want the alarm to go off 30 seconds from now.
long firstTime = Syste...
Hello everyone,
I would like to know the best practices for running a Service every day at 4AM.
The way I think I should be doing it is to create a new repeating alarm using AlarmManager and having it run the service at 4AM. Problem is, I'm not sure where to put the code to set the alarm.
Do I do it in my main activity as one of th...
I would like to add some sort of icon that a user can press in order to flip a variable in a broadcast receiver my app uses. Basically I just can a icon that they can press which will flip the value of a boolean in the broadcast receiver, and change the icon to indicate something happened. I think I need to do something with a widget? ...
Hi folks!
I'm currently developing an app in android that is accessing wifi values, that is, the application needs to scan for all access point and their specific signal strengths.
I know that I have to extend the class BroadcastReceiver overwriting the method BroadcastReceiver.onReceive(Context context, Intent intent) which is called wh...
I would like to send a notification in a broadcast receiver. the notification should launch the default sms app.
Ultimately I want to create my own notifications for incoming text messages consistent with what the deault app, Handcent, and Chomp do.
I have the code to detect the threadId of the incoming sms.
How can I craft the intent...
Hey everyone,
I have a BroadcastReceiver set up in my Android application that receives SMS receive events. This works fine, but I want to be able to toggle SMS receiving on and off by toggling the BroadcastReceiver on and off. Because if I have a simple boolean inside the onReceive method, even if the SMS receiving is off, my applicati...
Hi everyone,
BACKGROUND INFO:
I need to update some data from the web, about every hour or so, even when my app is closed. The update of the data itself takes about 40 seconds to 1 minute. It is then saved as a Serializable to a file. This file is read when my app starts.
THIS IS THE APPROACH I TOOK FOR THE MOMENT (not using a Service...
Hi,
I have an activity, it needs to response to a broadcast event.
Since an activity can not be a broadcast receiver at the same time,
I made a broadcast receiver.
My question is: how can I notify the activity from the broadcast receiver?
I believe this is a common situation, so is there a design pattern for this?
Thanks.
BR,
Henry
...
I've got an activity which uses an AlarmManager to call a BroadcastReceiver at a particular point in time. This all works fine, except when I try to add some extra strings to the intent when calling the BroadcastReceiver, they always come up as null on the other end.
Activity code:
Intent intent = new Intent(this, ScheduleReceiver....
I have an application that calls AlarmManager
Intent intent;
intent = new Intent(context, MyEventReceiver.class);
PendingIntent appIntent = PendingIntent.getBroadcast(context, 0,
intent, PendingIntent.FLAG_ONE_SHOT);
AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
alarmManager.set(AlarmManager.RTC_W...
I'd like to maintain a hash table in a broadcast receiver. If I understand BroadcastReceiver's life cycle currently it could get killed wiping out my member variables. What would be the ideal strategy for retrieving a hash table from a previous run of onReceive in the BroadcastReceiver?
...
I have a program that monitors incoming SMS's, and I want it to monitor them full-time, so I registerReceiver with a Broadcast receiver that I've created. The problem is, if I want to unregister that receiver, I can't unless I know the original BroadcastReceiver class I registered. This is not a problem if I set it to stop when the progr...