Questions tagged [android-pendingintent]

An Android class that provides a description of an Intent and target action to perform with it

From the PendingIntent API:

A description of an Intent and target action to perform with it. Instances of this class are created with getActivity(Context, int, Intent, int), getActivities(Context, int, Intent[], int), getBroadcast(Context, int, Intent, int), and getService(Context, int, Intent, int); the returned object can be handed to other applications so that they can perform the action you described on your behalf at a later time.

By giving a PendingIntent to another application, you are granting it the right to perform the operation you have specified as if the other application was yourself (with the same permissions and identity). As such, you should be careful about how you build the PendingIntent: often, for example, the base Intent you supply will have the component name explicitly set to one of your own components, to ensure it is ultimately sent there and nowhere else.

Useful links

1881 questions
0
votes
1 answer

My app doesn't respond to change in preferences

i'm trying to make the user choose the time of alarm but the alarm keeps triggering every 15 minutes "which is default" even if i choose another preference this is the code related to the problem in my MainActivity public class MainActivity…
0
votes
2 answers

When is OnResult called in an application ? (ResultCallback)

I am starting off with google places apis , I am trying to get current location of the device ,this is what i have done so far , but i can't figure out how and when the code inside OnResult is called , because logs inside it are not printed in…
0
votes
1 answer

Xposed: How to hook method that using PendingIntent

I want to fake location in android. In android, there is a way for getting location using PendingIntent. Here is an example: LocationManager service = (LocationManager) getSystemService(LOCATION_SERVICE); String proximitys =…
Trần Kim Dự
  • 5,872
  • 12
  • 55
  • 107
0
votes
0 answers

Multilple message sending not works properly in android

I have an android app which send multiple message and call on a click event.The problem is that I have two click event.On second click event the code works perfect, but on first click event same code not works (i.e. it not sending any message).this…
0
votes
0 answers

Play Services crash with obfuscated trace

I am currently investigating a tricky issue which I am facing with my application. It seems my app (heavily relying on Location, but also using Google Analytics and GCM Task Service) is causing Google Play Services to crash. (Popup appears rather…
0
votes
1 answer

Can't fix IntentService for notification with AlarmManager

I am trying to handle it this way: in BroadcastReceiver start AlarmManager repeated action, it will send intents to IntentService, service writes log. Now as I see from the log, BroadcastReceiver receives intent, starts AlarmManager, but…
0
votes
1 answer

Modify static BlockingQueue from PendingIntent triggered by AlarmManager

In my android application I have a "global" application class and inside it, among others, I have a static BlockingQueue in which I store information. When the queue is full I flush it to file. I have multiple producers, Services, BroadcastReceivers…
phcaze
  • 1,707
  • 5
  • 27
  • 58
0
votes
1 answer

broadcastreceiver does not kick in after rebooting

Good day, I am creating an app based on this. BroadcastReceiver and alarmManager Android it is running smoothly, then I try to make it run even the client boot its phone by adding this.
0
votes
0 answers

How to Navigate to the Required Activity with some extra values inside pending intent Using FCM?

I am Using FCM in my app. I can get the messages when my app is in foreground or background and I can also navigate to whatever page I want, but when I want to send some extra parameters to that activity, they are not reflecting and neither is the…
0
votes
2 answers

Push notification is not coming when the app clean(remove) from the task manager ?

In my app i am using push notification.it is working fine.but when i remove(clean) the app from the task manager.the push notification is not arriving.what is the problem i don't know.If anyone know how can i resolve this.Please tell me. This is the…
0
votes
0 answers

In push notification when user clear the app from the task manager the notification is not coming?

I am using push notification in my app. it is working fine when the app is running or in the foreground state.but when the user clean the app from the task manager/tab then the notification is not coming. I tried many method like package restart and…
0
votes
0 answers

Why my Intent is unable to call onHandleIntent(Intent intent) and notification method inside the IntentService class?

I have two classes mainly MainActivity.java and GeofenceTransitionIntentService.java class that extends IntentService. This class is unreachable. I have tried to call this class by using intent from MainActivity.java class but couldn't able to…
0
votes
0 answers

Android activity self-starting after finish of another activity

I have an activity used to clear some static variables and open the browser if a notification is clicked, and if the notification is dismissed by swiping it, the activity just close itself without opening the browser, i've managed to do this by…
0
votes
1 answer

Can an activity be invoked when the app is not opened from some pending intent without using notification or button clicks?

Note: I haven't coded anything but looking for a structure/keywords or ideas how it can be achieved. Use Case: I have an activity which basically shows some display/data/or does some operation etc when opened manually from button click,…
0
votes
1 answer

Background job every 1 minute, service, should I call `stopSelf()`?

I use AlarmManager to start service every 1 minute to perform some background job. Here is code snippet: Intent intent = new Intent(context, PostLocationService.class); PendingIntent pendingIntent = PendingIntent.getService(context,…
1 2 3
99
100