Questions tagged [localbroadcastmanager]

143 questions
0
votes
0 answers

ANR in android.com.systemui after attempting to end Screencast

For some strange reason, which I'm not entirely sure why, I'm getting not only an ANR for my application, but also of the entire systemui. It's so bad that I HAVE to reboot, and after rebooting it has to "Optimize" all of my apps like it corrupted…
0
votes
1 answer

Fragment's BroadcastReceiver onCreate method does not get called

I have a simple Fragment within my Activity in which I enable and disable Bluetooth adapter and I want to listen to Bluetooth Adapter state changes with a BroadcastReceiver from within the Fragment. The reason is that I want to directly change the…
0
votes
2 answers

LocalBroadcastManager does not functioning

In my android project there is one activity and on service. in the main layout i have three control : 2 buttons (start and stop button) and a TextView (for the result).when i click start button the service will start and sends a text message via…
0
votes
2 answers

How can I trigger sendBroadcast after sqlite insert/update finished?

How can I trigger sendBroadcast after sqlite insert/update finish? BroadCastReceiver get broadcast corretly. This is how I do it, but sendBroadcast fires before insert/update finishes. Edit To be more specific, here is more code how I do…
0
votes
1 answer

Determine if app has been closed without using OnStop()

What I want to do is send a logout request to my backend server when the user quits my app (can happen during any Activity, there are many). It seems like I cannot use OnStop() as I have a gallery chooser and camera Intent and when these are…
LKB
  • 1,020
  • 5
  • 22
  • 46
0
votes
1 answer

Activity, Service and what kind of communication between?

I'm trying to develop an Android application consists of an Activity and a Service. The Activity launch a process on the Service of indefinite duration, which will be closed from Activity. Do not use then the subclass IntentService, but directly…
0
votes
2 answers

LocalBroadcastManager onReceive() not called

This is what I'm doing : I'm sending an intent from MainActvity to my Fragment using LocalBroadcastManager. I wrote the onReceive() code in onCreateView() of the Fragment class. I'm unregistering the Receiver in onDestroy(). But onReceive() is not…
0
votes
1 answer

Cannot receive broadcast in Activity from LocalBroadcastManager in IntentService

it is very simple code to use broadcast between Activity and IntentService. The MainActivity starts SyncService (which is an IntentService), the SyncService broadcasts messages and MainActivity should receive the messages from SyncService (by using…
Martin Lau
  • 219
  • 3
  • 13
0
votes
0 answers

android local broadcast not received from Adapter to service

I have a Expandable List Adapter, which i am instantiating in MainActivity ExpAdap adap = new ExpAdap(MainActivity.this); And the constructor of ExpAdap is as below public void ExpAdap(Context cntext){ mInflator =…
0
votes
1 answer

Intent Filter by category with LocalBroadcastManager

I'm following geofencing guidelines and I can't get LocalBroadcastManager for intents with categories working. Intent sender sends 2 kinds of Intents with the same category GeofenceUtils.CATEGORY_LOCATION_SERVICES: -with action…
0
votes
1 answer

Receiver of LocalBroadcast not working for System broadcast

I have a service from where i can broadcast using LocalBroadcastManager. Intent downloadIntent = new…
0
votes
2 answers

LocalBroadcastManager don't receive broadcast on 2.3

Not works on 2.3. But works on 4.0.x. Why? Sending from IntentService: intent.setAction(MessagesThread.NEW_MESSAGE); LocalBroadcastManager.getInstance(this).sendBroadcast(intent); Receiving protected void onStart()…
GPPSoft
  • 480
  • 1
  • 6
  • 15
0
votes
2 answers

Broadcast from NetworkChangeReceiver does not come through

I have implemented a NetworkChangeReceiver which looks like this: public class NetworkChangeReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { final ConnectivityManager…
Mahoni
  • 7,088
  • 17
  • 58
  • 115
0
votes
1 answer

Android localbroadcast causes app to crash

We are having trouble with local broadcasts. For some reason in 2 androids(my own phone + boss's phone) it works fine. On another phone(galaxy s3 mini like my boss) and on boss's tablet it however crash. Program crash if the tmp.sendBroadcast…
user1396135
  • 11
  • 1
  • 3
0
votes
0 answers

LocalBroadcastManager Broadcasting not being receieved

I've tried the examples from many different answers to similar questions, but nothing works. When I press the back button, I get "Broadcasting message" in the log but not "Broadcast received". Why? public class MainActivity extends ActionBarActivity…
veiph
  • 21
  • 3
1 2 3
9
10