Questions tagged [localbroadcastmanager]

143 questions
0
votes
1 answer

How can I remove file from downloading list and send it into the downloaded file list?

I'm building a download manager app which can download multiples in parallel. I'm showing the downloading files in a listview where each item has a progressbar showing the download progress. When a file is dowloaded I want to remove that item from…
0
votes
2 answers

Intent getDouble()

I need to gather longitude/latitude location from a service I created on the app to all the classes requiring it. I want to do this via Intent getDouble call, but although the service works properly and updates the values every 30 seconds, the…
czane
  • 392
  • 1
  • 6
  • 18
0
votes
1 answer

Local Broadcast Manager using an alarm not received by main Activity

I have implemented an alarm manager it is working pretty well and every 15 minutes it is triggered. Now I want to call a MainActivity method every 15 minutes using the alarm. So I use a Local Broadcaster to the MainActivity (knowing that this is the…
Rekopx
  • 119
  • 1
  • 1
  • 11
0
votes
0 answers

Broadcast Receiver from Service in MainActivity / MapsActivity

I have a service, which get the current position every Second and then the Service should send the location with an Broadcast back to the Main Activity. With the log i can see, that the Service Class sends the Broadcast, but the MainActivity never…
0
votes
1 answer

Unable to send sendBroadcast from SyncAdapter to Activity

I have an application with a SyncAdapter that runs fine. The SyncService runs once per hour. My application has a main FragmentActivity called DeviceControlActivity and I would like to receive messages from the SyncAdaptor, such as the…
jgrocha
  • 2,912
  • 1
  • 28
  • 31
0
votes
1 answer

how handle fcm notification data without need to click on notification popup in android

i used LocalBroadcastManager and pass data through it in onmessagerecieved() if (remoteMessage.getData().size() > 0) { Log.d(TAG, "Message data payload: " + remoteMessage.getData()); Intent i=new…
0
votes
3 answers

Fragment to Fragment communication fails using LocalBroadcastManager

I am having a problem transfering data from one fragment to another using LocalbroadcastManager. FragmentA has editText and onclick on it will launch FragmentB. FragmentB has a list of items and onclick on each item I want to pass the data to…
Babs
  • 333
  • 7
  • 18
0
votes
2 answers

Unregister Receiver fail to unregister onDestroy

I am using BroadcastReceiver in my Main activity and register it at OnCreate and trying to unRegister it onDestroy but some time application crashing as it stating that i am trying to unregister a receiver which already unregister. Here is my…
user565
  • 871
  • 1
  • 22
  • 47
0
votes
1 answer

Pending BroadCastReceiver does not start using setDeleteIntnet

I make a notification and what i want to do is, when the user clicks the notification I sent to clear it, i want a pending broadcast to be executed. there is a method called 'setDeleteIntent'. According to the documentation of this method, it should…
0
votes
1 answer

Refresh UI after database change has occured

I'm developing an android app (native) that communicates with rest api (python/flask). Is there any good ways to detect database changes and then load new data from the server? Currently, after saving new data, the rest api sends Firebase push…
iqpolar
  • 125
  • 1
  • 2
  • 14
0
votes
4 answers

passing bundle from service to receiver return null

passing bundle from service to receiver return null i want to pass data in bundle from service to receiver to change ui data instantly i have pass data bundle as hashmap key and get the same in activity class but always get null i just register…
user7113784
0
votes
1 answer

Cannot using BroadcastReceiver with LocalBroadcastManager

I have 1 activity and 1 service. The service will be started when the activity comes into background and will be stopped when the activity comes into foreground. When the service stops, I want to send an object from it to the activity by intent.…
0
votes
0 answers

Android Local broadcast is not working from JobService

I am trying to send broadcast from JobService and receiving it from an activity . Here is what I have tried MyJobService @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) public class MyJobService extends JobService { @Override public…
mSapps
  • 601
  • 9
  • 24
0
votes
1 answer

Using LocalBroadcastManager without Activity using another class

This doesn't work, I never receive messages in the receiver. I've been working for hours. What I'm trying to do is using LocalBroadcastManager without Activity using another AppContext class. class 1 import android.content.Context; public class…
user3507230
  • 83
  • 2
  • 9
0
votes
1 answer

Android BroadcastReceiver null

I get this exception Fatal Exception: java.lang.NullPointerException at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:297) at…
user3057944
  • 701
  • 1
  • 8
  • 19