Android :: Possible Bug With Intents / Pending Intents

Nov 7, 2009

I have some code that is creating and removing alarms, and which works great in Android 1.5 and 1.6 but breaks on the Android 2.0 AVD.The code that's giving this exception is: Code...

Android :: Possible bug with Intents / Pending Intents


Android :: Need Widget / Pending Intents

Apr 26, 2010

I've asked here a question about Task Killers and widgets stop working (SO Question) but now, I have reports of user that they don't use any Task Killer and the widgets didn't work after a while. I have a Nexus One and I don't have this problem.I don't know if this is a problem of memory or something. Based on the API: So, I don't know why widget stop working, if Android doesn't kill the Pending Intent by itself, what's the problem? Code...

View 1 Replies View Related

Android :: Pending Intents In Notifications

May 13, 2010

I would like to show a notification that displays the progress of an ongoing operation. That works well for me. But at the same time the remote view should contain cancel button to stop the ongoing operation. The usual content intent should still do something else, i.e. not cancel the ongoing operation. It seems though that I can only have one intent. Code...

View 3 Replies View Related

Android :: Reusing Intents With Notification / Pending

Nov 19, 2009

In my app, user starts a service and shows a notification from activity A. The notification creates a Pending Intent that will invoke activity A should the user tap on it. The problem with this behavior is that, if the user starts the service (which shows the notification), drags down the notification bar, then taps the notification, I now have two activity A's in the display stack, one on top of the other and both exactly the same. How can I re-use the original activity A in this situation so the user isn't duplicating activities?

View 4 Replies View Related

Android :: LocationManager RequestLocationUpdates And Pending Intents

Sep 8, 2010

in order to save some battery, I was wondering what happens if an activity registers a requestLocationUpdates and then the user (or the os) puts it in background or kills it. Will the location manger still be active and then will the pending intent still be fired? In other words, will the location manager still be alive even if its lancher does not exist anymore? I'd really love this scenario because allows me to link an intent service that handles the location updates without bothering of have something always running waiting for good news from location.

View 9 Replies View Related

Android :: How To Tie Pending Intents To Specific Buttons On Widgets?

Sep 18, 2010

I have a Widget I am working on, that allows the user to have more then one instance of the widget on his screen. Each Widget ID maintains its own configuration file. However, for some odd reason my code that is responsible for setting up the buttons individually for each widget id is not working, only the first widget id is linked to each individual widget. Below is the code that is responsible.

private void TieClicks(Context context){
RemoteViews rViews;
PendingIntent editPendingIntent= null;
// Intent updateintent = new Intent(context,SyncNoteWidget.class);
// updateintent.setAction(SyncNote_Action_Widget_Update);
// PendingIntent pendingupdateintent = PendingIntent.getBroadcast(context, 0, updateintent, 0);
// rViews.setOnClickPendingIntent(R.id.widgettextview , pendingupdateintent);
// AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
int[] ids = appWidgetManager.getAppWidgetIds(new ComponentName(context, SyncNoteWidget.class));
for (int i =0;i< ids.length;i=i+1){
int wId = ids[i];
rViews = new RemoteViews(context.getPackageName(),R.layout.widget);
editPendingIntent = makeControlPendingIntentActivity(context, wId);
Log.v("syncnote", "tieing " + String.valueOf(wId));
rViews.setOnClickPendingIntent(R.id.widgeteditbutton, editPendingIntent);
appWidgetManager.updateAppWidget(wId, rViews);
editPendingIntent= null;
} }
private PendingIntent makeControlPendingIntentActivity(Context context,int appWidgetId) {
Intent active = new Intent(context, EditNote.class);
active.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK );
active.setAction(com.ntu.way2fungames.syncnote.SyncNoteWidget.SyncNote_Action_Edit);
active.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
return(PendingIntent.getActivity(context, 0, active, 0 ));
}

View 2 Replies View Related

Android :: Broadcast Receivers Not Receiving Pending Intents

May 20, 2009

I've had an issue where no matter how I've tried to set it up I'm finding the Broadcast Receivers aren't receiving any Pending Intents. A look through LogCat confirms that the intents are launched, but they're not being executed. I managed to make a simple(ish) repro case. If you take the SimpleWiktionary widget by Jeff Sharkey http://code.google.com/p/wiktionary-android/ and make the following changes plus any required imports. Code...

View 8 Replies View Related

Android :: Multiple Notifications -/Pending Intents With Different Data?

May 11, 2010

Let's say I have a background service that performs several tasks. As it completes task A, it posts notification A with a certain intent and some extra data that indicates viewing result of A. As it completes task B, it posts notification B with a certain intent and some extra data that indicates viewing result of B. As it completes task C, it posts notification C with a certain intent and some extra data that indicates viewing result of C. At the end, the notification area has three notifications. Each one has the same intent, except for one of the extra data fields. I would expect that each one would load my activity with different extra data. They don't. When onNewIntent is called, each has the extra data field set to C. I have rooted out any possible aliasing and checked the data as it is placed into a notification. It seems to allow only one set of data per package. Is what I am attempting not possible? Has anyone accomplished what I am attempting? For example, have you had a service download several large files, and then had notifications that would open each of those. Code...

View 4 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 :: Dropping Pending Intents / Clean Up Memory Appropriately?

Mar 16, 2010

Is it ok to drop Pending Intents in android if they are never used. Such as in an AppWidgetProvider where a Pending Intent that was never used be overwritten by a new Pending Intent. Or should we call cancel on all unused Pending Intents to clean up memory appropriately?

View 1 Replies View Related

Android :: How Different Do Broadcast Intents Need To Be?

Oct 30, 2010

I have an IntentService that broadcasts an Intent each time if finishes some work. Each broadcast Intent is identical except that it contains a Bundle with some result information from the IntentService. Evidently, having different data in the Bundle is not enough for Android to think it's a different Intent. If the IntentService broadcasts two of these Intents back-to-back, the second one is dropped as a duplicate.

I know I've read about this behavior in this forum in the past but I can't find in the documentation where this duplicate elimination logic is described in detail. Mostly, I just want to differentiate the Intents enough that they are not considered duplicates. Any pointers would be appreciated.

View 13 Replies View Related

Android :: Animations Between Intents

Mar 9, 2010

I've a succession of 2 Intent: Intent intent = new Intent(); intent.setClass(EntryPoint.this, MainClass.class); startActivity(intent);

And I'd like an animation (which is present in res/anim) occurs during the transition between these 2 Intents...

View 2 Replies View Related

Android :: Tabs And Intents

Aug 15, 2010

I have a auto-complete textbox in which the user makes a selection. From here I want to load a tabbed layout which is based on the user selection. The problem is I cant figure out a clean way to pass that selection to each of the tabs. At the moment I can pass an intent to the 'tabhost' activity and then pass to each child activity explicitly, however this just seems like messy iterative code to me! So basically how can I pass my intent data bundles to the tabs activities cleanly & efficiently! Psuedo code is also very welcome.

View 2 Replies View Related

Android :: Intents Alarmmanager

Aug 7, 2010

I am trying to create intents that will be set using alarmmanager. Currently, I can do this with one intent, add extra data to it (strings, but i send them as one string with a seperator), and everything works fine and goes off at the correct time. However, when I try to send multiple intents like this, they are overwritten and only one goes off at the correct time. How can i structure my intents so that they appear different to the alarmmanager (i think they are getting deleted when filterIntent() is run).

long story short- putExtra() makes all the intents look the same still... how can i make them look different so they wont get deleted (and keep track of them in case i want to delete a specific one)

View 2 Replies View Related

Android :: List Of All Intents?

Oct 27, 2010

I want to received the Android broadcast, is there a list of all intents?

View 2 Replies View Related

Android :: Passing Values With Intents

Nov 17, 2010

I have searched and searched and I just can't get this code to work. I have a main.xml layout and a setting.xml. I have some values I would like the Settings.class to change in my main apps class.Three string to be exact. I have tried this simple test code in my main app class.

settings.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v) {
Intent intent = new Intent(v.getContext(), Settings.class);
startActivityForResult(intent, 0);}});

//Then a function
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent){
super.onActivityResult(requestCode, resultCode, intent);
Bundle extras = intent.getExtras();
String value = extras.getString("myKey");
if(value!=null){
Log.d("hmmm",value);}}}

In my settings.class I have the following
returnHome.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.putExtra("myKey", "YEAH");
setResult(RESULT_OK, intent);
finish();}});

Back in main app class it is not getting logged. Like I said I have three string in the main class that I want settings class to change and send back.

View 2 Replies View Related

Android :: Blocking Intents From Launching?

Apr 6, 2010

On the market, there's an application called App Protector, which seems to effectively block the launching of configured activities until a password is correctly provided. By default, it blocks access to itself (not very interesting), Settings, and a few others. I wrote my own app to launch settings (rather than doing so through the home screen) and App Protector continued to do the job it claims to do.
When an activity that is protected is started, App Protector's password input activity is shown instead. Once the correct password is provided, the activity that was started comes to the front.
First -- does anyone know how this app is able to get between the rest of the system and the activities it protects? I would like to do something along these lines in my own application as well. Perhaps this app is receiving a broadcast about other activities coming to the foreground, and when the foreground activity is protected, it forces itself to the foreground?
Second -- does anyone know how well this technique will stand up to attack? Are there other ways to circumvent, where start Activity(...) fails to? It seems that one could use adb to un install it, thus removing its protection easily, but if I pursue my plans here, the app will be a part of a device's firmware (which, I assume, offers some protection against its apps being installed?)

View 2 Replies View Related

Android :: Messaging And Email Intents

Aug 10, 2010

Found similar examples--not exactly what I need. I simply need to start messaging (SMS) and email intents from my app with their "to" fields already populated. So I need to send a number with the sms intent and an email address with the email intent.

View 1 Replies View Related

Android :: Activity / Intents InTabs

Sep 19, 2010

Developers. I am a newbie to Android but a seasoned developer in UI, Java , and ECLIPSE. I am trying to do something I believe is very simple yet I am struggling. I have two tabs, A & B. I want to put an Activity in each tab. I want to have the 'B' Activity live inside 'A' so I can access it within 'A'. 'A' has a clock and every second that passes I need to update information in 'B', even if 'A' is not currently shown. I put 'B' into the 2nd tab as follows:TabSpec mapInfo=tabs.newTabSpec("tag3"); Intent intent = new Intent(this, MathleteMapActivity.class)mapInfo.setContent(intent); mapInfo.setIndicator("Course Map");tabs.addTab(mapInfo); I am totally confused on how to get the "MathleteMapActivity" Activity from the Intent 'intent'. There appears no way to do this. Can anyone please recommend a cleaner way to do this knowing what I am trying to do?

View 4 Replies View Related

Android :: Launching Activity Through Intents

Aug 9, 2010

I am implementing a simple app. I need to start an activity based on the state of the Activity. Lets take i am using a button to start the activity.
1. If the activity is not started, I need to start XYZ activity.
2. If the XYZ activity is on focus, then i need to close the activity on the button press.
3. If the XYZ activity is not in focus (like onPause) state then, I need to change the button state.Can you please help me in the flags that i need to use for starting the intent. Is it possible to get the state of activity before I start that activity?

View 2 Replies View Related

Android :: Implicit Vs Explicit Intents

May 26, 2010

Working with android I realized that implicit intents are good choice in most of cases due to their's flexibility. But what's about explicit intents? What are benefits of using them? What are common cases when it's a good practice to use them?

View 1 Replies View Related

Android :: Methods Of Intents Activity?

Jan 8, 2010

I have two applications A and B (in different packages,but it doesn't matter).Application B is an sms application that i have made and contains one activity.This activity has a method called sendSMS(String number,String text).I want to call this method from application A and send an SMS without opening the activity(the GUI) of application B but just send an SMS in the background by calling just the method of the activity.Any ideas?

View 10 Replies View Related

Android :: Instantiate AIR Application Regarding Intents

Jul 14, 2010

I have few intents in my manifest file and an AIR application. How can I instantiate AIR application from android.

View 3 Replies View Related

Android :: Separate Intents For Email & SMS

Jun 28, 2010

I have an app that has two buttons one for email & one for SMS. Depending on the button pressed I want to email or else SMS a certain text. I have coded the email button and it is working fine. The problem is that the dialog box that pops-up gives an option of e-mail or Messaging the text. I want to separate out the two, so that when the user presses email, only the options of email is there, and when the user presses SMS, only the option of Messaging is there.

View 1 Replies View Related

Android :: Finding All Supported Intents

Dec 22, 2009

How do I LIST all the INTENTS supported by all the activities(all applications as well) in the Phone.

View 2 Replies View Related

Android :: Sample Program To Use Intents?

Oct 18, 2010

I am new to android. i want sample program how to use intent

View 3 Replies View Related

Android :: Discover Intents That An App Supports?

Jan 26, 2009

Is there any way to discover which intents a given app supports? An old post indicated that PackageManager.GET_INTENT_FILTERS isn't supported, might there be some other way to do this?

View 18 Replies View Related

Android :: How To Populate A Menu Using Intents

Nov 3, 2010

How can I populate a menu using intents? I didn't understand that thing.

Or is there any better way for that?

Update:

Suppose I have an application that need to resize the image,and there are many other applications that have a capability of resizing the image. How can I show the list of applications on a menu in my application so that when clicking on a particular option it will invoke the intent associated with that application. Simply saying I could resize the image in my application with out bothering about how that will get done.

View 1 Replies View Related

Android :: How To Open Email Program Via Intents

Jul 22, 2010

I want to setup a part of my application that allows users to send a quick email to another user. It's not very hard to set this up:

Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, subject);
intent.putExtra(Intent.EXTRA_TEXT, message);
Intent mailer = Intent.createChooser(intent, null);
startActivity(mailer);

However, the problem is that the ACTION_SEND is accepted by more than just email programs - for example, on my phone the Facebook app, Twitter, reddit is fun, and even Bluetooth come up as viable alternatives for sending this message. The message is entirely too long for some of these (especially Twitter). Is there a way to limit the chooser to just applications that support long messages (such as email)?

View 3 Replies View Related

Android :: How To Use Intents From Service Or Broadcast Receiver?

Dec 15, 2009

I need to be able to handle/catch Intents while my Activity is closed. So I am looking at either a Service or a BroadcastReceiver. Is it possible to "receive" intents to a service itself? I tried to search, but could not find anything helpful. With a BroadcastReceiver, I am not exactly sure how that works outside of an Activity. Does it depend on the Activity being open/running? Can it run by itself?

Let's say that my Activity is killed by Android(or a task killer app), does the BroadcastReceiver still receive intents and process them? I have used a BroadcastReceiver as a widget, but I do not want to use a widget this time. My goal is to have the user open the Activity to set some options. From there, they would be able to close the Activity, but I would still be able to process Intents that were sent out by the system. I am still fairly new to Android development, so I could be so far away from where I need to be.

View 1 Replies View Related







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