Android :: Mulitple Instances Of Pending Intent

Sep 16, 2010

I created a widget that when clicked activates a PendingIntent.The problem is when I have more than one widget on the screen only the latest one will start the PendingIntent.I have read some about a unique request code, but not figured this out.Any ideas how I can have multiple widgets and the PendingIntents work for each?

Android :: Mulitple Instances of Pending Intent


Android :: What Is Pending Intent?

Feb 17, 2010

Please clarify me What is Pending Intent with an example.

View 2 Replies View Related

Android :: What Pending Intent Is?

May 11, 2010

I am newbie to Android. I read the Android documents. Can anyone tell me what "Pending Intent" is?

View 1 Replies View Related

Android :: Pending Intent ReceiverPermission

Oct 29, 2009

I've started using an AlarmManager for some tasks i'm doing and while setting up the pendingIntent to be broadcast I noticed there is no receiverPermission option. Can anyone tell me is it possible to set the receiver permission on a pendingIntent?

View 10 Replies View Related

Android :: Exception On Pending Intent

Aug 18, 2010

That message can occurr if the receiving code crashes or takes too long. I am writing an appwidget for my application, there are like multiple pending intents are there to launch an activity or receive a broadcast. The Problem I am facing is , some times I get exception saying that the Pending Intents cannot be delivered. And the widget does not responds to the touch from the user. please help me. I am not able to find any alternative also.

View 2 Replies View Related

Android :: Pending Intent Notification

Jun 9, 2010

I have a alarm thing going on in my app and it launches a notification that then when pressed launched an activity.The problem is that when I create more than one alarm then the activity launched from the notification gets the same extras as the first one. I think the problem is either with the intent i put in the pending intent or in the pending intent itself. I think I might need to put a flag on one of these but I dont know which one.The "details" extra is the same to every the next time a notification happens instead of having the different value.Until I set the intents I am sure that the correct value goes to the "details" so its a problem of getting the first intent everytime i press any notification. How can I make it to launch the correct intents?

View 2 Replies View Related

Android :: Starting Two Instances Of Activity With Flag Intent

Jul 18, 2010

When starting two activities of the same class within the same instance using the flag REORDER_TO_FRONT, the new extra information of the second call does not override the first starting activity. Is this the desired behavior? How do retrieve the new extras?

For example: In the StubActivity, I have this code:
Intent i = new Intent(this, A.class);
i.putExtra("foobar",1); startActivity(i);

Activity A is displayed, and then this code is called upon a button press:
new Intent(this, A.class);
i.putExtra("foobar",2);
i.setFlag(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(i);

Activity A is re-displayed. Now check for the extras: int foobar = getIntent().getExtras().getInt("foobar")
Turns out that foobar = 1

View 2 Replies View Related

Android :: Passing Data With Pending Intent

Jun 28, 2010

I would like to create some home screen app widgets that are entry points into an application. I can put a button in the app widget that uses setOnClickPendingIntent to start the activity. The problem occurs when I want to have two of these app widgets that are entry points to different parts of the activity. I need to be able to pass data into the activity that will distinguish these. Since both app widgets use a Pending Intent that starts the same activity, the two Pending Intents are shared and I can't reliably set extras for the corresponding intents.

View 2 Replies View Related

Android :: Which Intent Flags When Setting Pending Intents?

Apr 30, 2010

I have one WidgetProvider but expect the user to have multiple instances of the widget on the home screen. When the user clicks on the widget, an intent is fired to start an activity A passing a String extra (which is specific to that instance of the app widget). Everything works fine unless the activity is already running, in which case the activity is shown in its previous state (and so the intent extra data is ignored). I've tried using various Intent flags (like FLAG_ACTIVITY_NEW_TASK) but they don't seem to help.

View 4 Replies View Related

Android :: Pending Intent Started From Notificaion Does'nt Replace Last

Jul 5, 2010

I've read many posts on the same topic and tried all the given solutions without getting the result I want.The program should start an intent with extras from a notification.The problem is that when a new notification is shown, the extras added to the intent is the same as in the first notification. I've triend with differnt flags in both the intent and the pending intent, without result. What am I getting wrong?If i just launch the same activity (and the same extras) with a button, everything works as it's supposed to.

View 1 Replies View Related

Android :: How To Declare Pending Intent That Keeps Fresh Extras?

Jun 29, 2010

A few days ago I was struggling to find a way to use custom intents for my alarms. Although I got clear answer that I have to customize the Intents based on some unique ID eg. setAction() still have some problems.This can happen more than once for a contact. And when the second message is generated, the notification is raised well (message is fine there) but the intent when the user actions the notification it uses old data, so previous message is passed and not the brand new message.So someway the intent is caching and reusing previous extras. How can I make it unique per contact and per action?

View 3 Replies View Related

Android :: Intent Filters - Prevent Creation Of Multiple Activity Instances?

Feb 16, 2010

I added an intent filter to one of my activities, so that when a user clicks a URL like "www.mysite.com", and if my app is installed, my registered activity can be launched. It works well.

I see that this creates a new instance of my registered activity though, every time a link is clicked. Is there any way to prevent multiple instances from being created - just recycle an existing instance if one already exists?

View 6 Replies View Related

Android :: Alarm Manager For Multiple Pending Intent Are Not Working.

Aug 16, 2010

In my application i have created pending intent which calls another activity (after 20mins of alarm off) with the help of alarm manger. It should happen each time for each new pending intent or when I call that activity. But when i create one pending intent and after few mins again create new pending intent ,then the last one overlap the other previous pending intents and start specified activity only for ones for the last pending intent.I want that each time i create any pending intent it should start specified activity after 20 mins of it's alarm off time.How it can be done ?

View 7 Replies View Related

Android : Multiple Activity Instances Launched By Same Intent. Bring One Uniquely To Foreground?

Nov 12, 2010

I'm struggling with my app that launches multiple instances of the same Activity using the same intent. My main activity is of class type A and it does a startActivity() of two children that are of the same class type B. So we have B1 and B2 launched. If B1 and B2 are both paused (by pushing back button and making sure finish() is not invoked on them so they are truly paused), how can A uniquely bring either B1 or B2 to the foreground again? I do want to launch a new B activity. I want to uniquely bring B1 or B2 to the foreground.

so both B1 and B2 were created like this... Intent intent = new Intent(context, B.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent);

Now I want A to bring B1 (or B2) to the foreground/front so I use the below code, but how do I distinguish B1 or B2 when starting the activity? This only brings the last instance of B that was on top to the foreground.

Intent intent = new Intent(context, B.class); intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); startActivity(intent);

I've tried keeping around references to B1 and B2 and doing something like this, but this also only goes to the last instance of activity class B that was on top...

Intent intent = new Intent(B1context, B.class); intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); B1context.startActivity(intent);

I even tried this, but it still doesnt get me my unique B1 or B2... Intent intent = B1.getIntent(); // i.e. the original intent that started me startActivity(intent); // still only brings to front the last B that was on top.

View 3 Replies View Related

Android :: Differentiate Emulator Instances And Real Device Instances

Jul 22, 2009

I need to correctly be able to differentiate between emulator instances. I know it's easily done with real devices. With real devices, you can use getDeviceId or getLine1Number from TelephonyManager. With emulators, all the instances have the same device id, same subscriber id, and same line1 number. Is there a way to differentiate them? Using NetworkInfo, I can call the toString method and I get my ip and the port on the computer. The problem with that is that the port is always different. I would like something more stable. Like when you use "adb devices" in command line. Emulator #1 is almost always "emulator-5556" and emulator#2 is almost always "emulator-5554". Is there a way to get the same info I get from "adb devices" in my code? If not, is it possible to use a command line parameter to force the emulator to use a certain phone number?

View 3 Replies View Related

Android :: OnListItemClick With Mulitple Value / Retrieving Value

May 22, 2010

I am trying to retrieve the 2nd value from a Arraylist/ArrayAdapter that I have populated. I am new to Array so please correct me if I am wrong

Q1. I created the Array Favorite. What I think what I created is an Array with two set of value call Detail | Value. example Detail="Yasmin",Value="8". Is this correct?

Q2. I have assign the Favorite Array to the mFavlist listview. During the OnItemClick I can return the label "Yasmin" by the position of the listview. What I would like to do is return the value of "8". What would be the best way to do this?

import java.util.ArrayList;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.AdapterView.OnItemClickListener;...................

View 1 Replies View Related

Android : How To Search Mulitple Developers In Market

Feb 3, 2010

I am adding a menu option in my newest application that will allow users to view all of our other applicatiosn we've published to the market place. The problem we are having is we created a second more business like developer account, but want to let users also see all of our old apps. I know how to have the search point to one developer, i.e. pub:<developer name>, but does anyone know of a way to have it search multiple? So that when they click the button all the apps from the older developer we had along with the newer business developer we created?

View 3 Replies View Related

Android : How To Differentiate Between Mulitple Alarms In Droid

Oct 19, 2010

In the Android app which is getting developed, i have multiple alarms.

I want to initiate, different actions on different alarms.

How can i differentiate or determine , exactly which alarm has been fired?

View 1 Replies View Related

HTC Desire :: Sending Text Message To Mulitple Recipients Sends As MMS

Aug 12, 2010

If I send a text message to multiple recipients it sends as an MMS. I understand that this happens by design on some networks if you're sending a text to more than 10 people at once, but I was only sending the same text to 2 people. I'm with T-Mobile and I have unlimited texts as part of my contract, but MMS messages cost 20p each, so obviously I don't want this to happen. Can this be changed so the messages send as regular texts?

View 8 Replies View Related

Android : How To Run Multiple Instances Of Same App?

Sep 14, 2010

is it possible to run multiple instances of the same app on android? What I mean if the app does not support multiple identities is it possible to install it twice and configure each instance separately?

View 1 Replies View Related

Android :: How The Use Same Instances When Launching Application Twice

Apr 14, 2009

My app has 4 activities on the stack A->B->C->D (top)

If you press home and re-enter the application, another instance of A is started, so the stack is A->B->C->D->A (top). I know this because when I press BACK, A is popped off and I now see D (instead of going to the Home screen).

What I want is that when the user re-enters the app, they re-enter on the same activity they were in before (D).

CODE:................

View 2 Replies View Related

Android :: How To Use Same Instances When Launching Application Twice

Mar 17, 2009

Is it possible to re-use all the instances of Activities and Services when an application is launched twice. For instance: 1/ I start my application APP1. Some activities are launched and a service is started. 2/ I click "Home" device button 3/ I can see the icon the launch again my application APP1 4/ I click on it and the APP1 is launched twice

I would like to re-use the existing the instances of Activities and Services from the first launch. I guess it is related to "SingleTop" or "SingleTask" but it doesn't seem to work.

View 11 Replies View Related

Android :: Multiple Instances Of Service?

Apr 15, 2010

I would like to do this, let me know if it possible in android?

App1 --> bindService() or startService() to AndroidService1 App2 --> bindService() or startService() to AndroidService1 (same service)

I would like App1 and App2 to get different instances of AndroidService1. Why I want to do this is say App2 doesn't need the service any more & it calls stopService() then App1 should still continue to work with its own instance of service app.

View 2 Replies View Related

Android :: Running Two Instances Of Emulator

Jul 19, 2010

I have written some code in eclipse and I want to run it on two separate Android emulators.

How do I do this when I click "Run"?

I read online and it said I need to do AVD configuration. What is that and how do I do that?

View 2 Replies View Related

Android :: One Vs Many Instances Of HttpClient Per Application

Oct 23, 2009

Until recently, our app shared a single Apache HttpClient instance using the ThreadSafeClientConnManager across the whole application. The http client instance was held by a singleton class.

Since I dislike the singleton pattern for its numerous problems, I refactored our API accessor to be a per-thread object, but now for every thread (which mostly means per Activity/Service in our case) a new HttpClient instance is created.

It's not that I have problems with this new approach, but I've read that the Apache folks suggest to only have one instance per app for performance reasons.

Visually, what we did before was this:

HttpClient (thread safe)
|
|
/
/
Activity1...ActivityN

Now, we do this:

Activity1 ... ActivityN
| |
| |
HttpClient1 HttpClientN

How do you guys do this in your applications? If you share one single HttpClient across your app and potentially many concurrent threads, how do you handle access to it?

View 1 Replies View Related

Android :: Connect Two Emulator Instances Through Network

Apr 7, 2010

I'm doing a distributed system using Android for my research project.In order to test it, I have connected two emulator instances in the same host machine. However, I need to put these two instances in separate host machines and make them connect through the local network (Wi-fi).I have seen that the emulator runs behind a virtual router, so it seems that I would have to somehow configure such virtual router, in order to forward my requests.

View 2 Replies View Related

Android :: Launching Multi Instances Of Emulator

Feb 28, 2009

How to i do to launch 2 instances of the Emulator at the same time?

View 2 Replies View Related

Android :: How To Create Multiple Instances Of An Activity

Feb 19, 2010

I want to create multiple instances of an activity in the same process. Should I use FLAG_ACTIVITY_NEW_TASK flag like the code below?

CODE:...............

This code is executed in class A to create another instance of activity A.

This question, will this code create another task? As I understand is a process can only have one task. Does it mean the two activities will exist in different tasks? That's what I want. I want the two activities to be in the same process.

View 1 Replies View Related

Android : How Would You Call A Method From All Instances Of A Class?

Sep 18, 2010

I am writing a basic game engine and have an abstract class that represents any object that can be drawn in the 3D world, however inside this class is an abstract method Render() which I would like called automatically by the engine on each draw phase.

How could I implement this so that every class extending from my abstract class will automatically have Render() called? I am using java, android sdk 2.2, and opengl es

View 4 Replies View Related

Android : How To Create Multiple Instances Of An Activity?

Jul 1, 2010

I was wondering is it possible to create multiple instances of a single Activity in Android?

I currently start my own inCall screen for a Voip Test by using the following code...

This allows me to start the Activity fine. However when I call it for a second it just returns to the Activity already created rather than creating a new Activity and placing it on the stack.

I would like to be able to create the activity multiple times so that I have two or 3 Activities on the stack and the user can switch between them, using Home, Back buttons etc... Is this possible and if so what am I doing wrong?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved