Android :: What Intent Flags Are Recommended For Activities Started By Notifications

Nov 8, 2010

I am running into a peculiar issue with an app which has multiple Activities.I have a screen manager class that is bound to a service.The service polls a server for data.The screen manager starts Activity A, B, or C, based on the data.It will also allow the user to select to display the other Activities or it may swap out an Activity automatically based on new data from the service.Currently all the navigation works great and if the user presses Home, the applicable Activity comes back to the foreground when the user presses the apps icon from the Android home screen or the recently run apps list.I then had to implement a new feature to display an icon and notification.I first implemented this by only displaying the notification when the Activities were no longer visible by setting it in each Activities on Pause.Worked like a charm and gave the user a third option to redisplay the app after Home button press.However if the data from the server (when the app is not displayed) causes the screen manager to update the Activity to be displayed I have issues. I think my Activity stack is getting screwed up.I have since tried a little different model where the screen Manager handles the notifications and always displays the notification, updating it with a new Intent whenever an Activity is updated, but its still not cutting it.

When the app is minimized and the data changes I can see the screen manager call the startActivityForResult on the new Activity and it seems like Android knows we are minimized and does not display the Activity. I can then also the screen Manager call to finish on the old top Activity.Each Activity currently has the flag set to singleTop in the manifest and FLAG_ACTIVITY_SINGLE_TOP in the code. When the data hasn't changed on the server, I pull the app back up using any of the above I get what I expect and the Activity's onNewIntent is called. However when the data has changed and the user calls up the app via the notification it calls the Activities onCreate. The Activity does come up and runs, but then pressing back takes me to what seems like another instance of the same Activity instead of exiting. I just took a closer look at my logcat and I see 2 calls to the Activity's onResume, but then no doubles after that.

Android :: what Intent flags are recommended for Activities started by Notifications


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 :: Should StartActivity Always Run Started Activities OnCreate?

Aug 10, 2010

I have a main activity and a sub activity.The main activity starts the sub activity using startActivity, and passes an object in the intent.The sub activity reads the object out of the intent in its onCreate action.The sub activity updates the object, then returns to the main activity using startActivity, again passing the updated object back.However, the main activities onCreate function is not called, so the code it contains to read the passed object does not run.Further investigation indicated that the main activity onPause event is firing, i.e. it is only paused when the sub activity runs, so when the sub activity starts the main activity again, it just on Resumes.Does anyone know if there would be any disadvantages if I moved my data restore/store activities to the onResume and onPause events?I'm not using the onCreate saved Instance State, should I be?

View 4 Replies View Related

Android :: IF Statement For Intent Started Activity

Aug 25, 2010

I have a central activity that can be launched from two separate classes. I was hoping that in this central activity I could have an IF statement like

if(this.getIntent() == MainMenu.class)
{
// Do something here
}

But obviously that isn't legal so how could I structure an expression to check from what class an intent was started.

View 2 Replies View Related

Android : How To Clear Intent That Started Activity?

Jun 30, 2010

At the beginning Activity is launched by an Intent and something is done with this Intent. When I change orientation of my Activity, it's reloaded again and Intent is passed to the Activity. How can I clear that Intent to prevent Activity from using it again?

View 1 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 :: Too Many Activities Being Started When Launching An Android Application

Dec 24, 2009

You can see property action android:name= property is "android.intent.action.MAIN" and categoryandroid:name= is "android.intent.category.LAUNCHER" for all activities.When application starts up, it calls First Activity. Then calls useless Activity such as ThirdActivity or Second Activity.In this case, is my manifest.xml correct?Or, do I need to set another property to Second and Third activity? If so, what is that?I wonder manifest.xml file is right for my case.

View 3 Replies View Related

Android :: How To List Activities Which Match An Intent?

Apr 17, 2010

I have a few separate applications which are all launched purely through a main application.I am wondering if I'd be able to use intents to retrieve a list of all the sub-applications which match some discovery intent. The main application currently needs to know what Intents to use to START these sub-applications, but is there a way to use intents to see if other Activities on the device match a set of intent-filters?

View 1 Replies View Related

Android :: Communication Between Activities - Intent Or Service - Faster

May 3, 2010

Is there a significant difference in time needed for sending data over a service or by using an intent?

Are there general advices when to use service and when to use intents?

View 4 Replies View Related

Android :: Need A List Of Recommended / Not Recommended Browsers?

Aug 20, 2010

I haven't seen a post on this in a while. Does anyone have a list of recommended or not recommended browsers? Maybe some pros and cons of each.

View 12 Replies View Related

Android :: Reloading Our Activities State After Firing Intent To Camera

Aug 31, 2009

We have an Activity which has a form on it and we launch an Intent to take a picture.We've overridden onSaveInstanceState and onRestoreInstanceState to push the data from the view fields But, on the return from the CameraActivity, the onRestoreInstanceState method is never called. Should this behavior work when calling another Intent?

View 7 Replies View Related

Samsung Epic 4G :: Stock Facebook App Notifications Just Started?

Oct 25, 2010

Today my phone (Sprint Epic DI18) sounded a notificatiom and I was surprised to see a facebook icon on my status bar that told me that I had a new message from a friend.

AFIK, this option wasn't implemented yet. Is this starting to roll out now?

View 2 Replies View Related

Android :: Add Compiler Flags To Standard Build.xml

May 17, 2010

I want to add -Xlint:deprecated to the java compiler while building android app.I've seen the compilerarg tag inside javac tags, but the generated build.xml for the standard project doesn't have such a tag.

View 1 Replies View Related

Android :: Switching Activities / Passing Data Between Activities

Jun 30, 2010

how to call BarCodeScanner, and return the value to a field.so now, i have a toast that says "successful scan" and then i want to pass the result to a new activity. when i comment out my intent, everything works (minus the passing of data/switching of screen, obviously) but when i run my project as is, it FC's no errors reported by eclipse in code or xml. any insights?

View 2 Replies View Related

Android :: How To Add Flags To A Notification Status Bar Notification?

Oct 19, 2010

im following the tutorial from developers guide but i have a problem tutorial says: "To clear the status bar notification when the user selects it from the Notifications window, add the "FLAG_AUTO_CANCEL" flag to your Notification object" buT how i can add the flag to my notification?notification doesn't have any kind of function to add flags then? how i can do it?

View 1 Replies View Related

Android :: Recommended Photo App

Oct 15, 2010

There is any decent app useful to see the photos stored in my Desire? I have a lot of photos stored in the SD card and the stock one is slow, and hangs up quite often.

View 4 Replies View Related

Android :: Most Recommended WiFi On / Off Toggle Application?

Nov 14, 2009

I want to download a WiFi Toggle On/Off App on my Sprint HTC Hero. I assume this will save battery power. Correct? This will save battery power because when it's toggled off, it won't waste power searching for available WiFi networks when I don't need to be looking for them. Correct? I can go into Menu, Settings (so many steps) to change my settings to turn this on and off. So, there's Apps on the Android Market that can be downloaded to have a WiFi - On and Off - toggle switch. I went to the Android Market and there were so many!

Question:
What is the most recommended - simple - practical - no bells and whistles - most reliable - absolutely best that nobody beats it - WiFi - On and Off - Toggle switch? I see this one from Curvefish is quite popular: WiFi OnOff v1.2.1 Application for Android | Tools
Is this one the most recommended?

View 5 Replies View Related

Android :: Preferences Use Explanation - Recommended Best Practice?

Oct 6, 2010

Some of my app's preferences could use some more explanation than the scarce space available for the summary. Sadly, there doesn't seem to be support from the system, like an optional help button that shows a longer text. How do you solve this problem? The first thing that comes to mind is an additional custom "preference" like "more information to above entry" that opens an AlertDialog with the help text, but that's not really nice for both user (two entries for the same preference) and the developer (manual work to do in Preference Activity). A bit nicer for the user, but way more work for the developer would be custom dialogs for each preference with more text and/or a help button. Is there a better solution or even an officially recommended best practice?

View 7 Replies View Related

Android :: Recommended Good Applications For Phone?

Jul 8, 2010

So, after three long years with my Samsung Alias, which I bought before it was popular enough to get the fancy Alias brand name, I am upgrading to the Droid X. This is my first Android phone and so I am wondering about what the "essential" Android apps are. What finally sold me on switching to Android was the Endomondo sports tracking app. I was contemplating getting a smartphone and a Garmin Edge bike computer, but when I saw a post about Endomondo, I axed the plans on the Garmin and decided to pull the trigger on the DX. In case this helps people in their advice-giving, I am a cyclist racing in college right now, I have an almost unhealthy interest in everything gadgets/computers/video games (and I suspect I'm not the only forum member like this ), I love sports (hockey, lacrosse, football, basketball, baseball, cycling, wakeboarding, skiing, surfing, etc.), and I love movies and TV (especially Entourage and Californication). So, with all of that in mind, who's got some good apps that I simply must have once I get my shiny new piece of hardware?

View 3 Replies View Related

Android :: Recommended Encryption Combination For Digital Signatures

Jul 3, 2010

I have finally - after days and days of agony - figured out that I need two forms of encryption for my Digital Signatures Project. The first will will be symmetric (AES) and will encrypt the license data and the second will be a asymmetric (RSA) an will encrypt the symmetric key. Can someone give me pointers on the best methods to use for Android.

For the public/private keys I am using: "RSA/ECB/PKCS1Padding"(I head ECB is bad so what should I use?, what about the PKCS1Padding - shoudl I be using PKCS5Padding?)

For the symetric keys I will probably use: "AES/?/?" (What mode and padding should I use?)

The provider: "BC"

RSA Keysize: 1024 (I tried 2048 but it didn't work for some reason)

AES Keysize: ?

View 4 Replies View Related

Android : Recommended Way Of Creating A Demo Version Of Application

Apr 23, 2010

What is the recommended way of creating a demo version for an application. Basically, the demo version will be fully functional, but will be limited to running it 25 times. My worry is that if the user uninstalls and reinstalls, the count will be reset. I thought about writing a data file to the SD Card with the count of executions (hoping that would persist after uninstall), but I do not want to add that permission if I can avoid it. Any suggestions on how to have some type of demo flag persist after an uninstall?

View 1 Replies View Related

HTC EVO 4G :: Recommended Set CPU Use

Oct 12, 2010

How should i use Set CPU i am pretty confused with using it and right now its not saving me any battery life what should i do so.

View 25 Replies View Related

Android :: Exchange Activesyc - Subfolder Synchronisation - Recommended Applications

Aug 18, 2010

I have a major issue that my first android phone (Samsung Galaxy S). It does not support auto synching of Exchange email sub folders. This is a show stopper for me (see earlier posting):

http://androidforums.com/htc-desire/77734-outlook-subfolder-alerting-when-exchange-syncd.html

There has to be other apps that work well wih this and will not degrate my overall android experiance.

I looked at Dataviz Roadsynch - however latest release slated in market place. I've heard about touchdown but hoping for more feedback. What other options do I have?

View 15 Replies View Related

Android :: Want To Store A Couple Of Wav Files / Blob To Sqlite Right - Recommended Way?

Mar 26, 2010

I'm generating about 6 wav audio files at runtime. I want to store them in internal memory. Is a blob to sqlite the right/recommended way?

View 1 Replies View Related

HTC Desire :: Recommended Car Charger?

Aug 10, 2010

Can anyone recommend a good car charger?

View 1 Replies View Related

HTC EVO 4G :: Recommended Live Wallpapers?

Jun 4, 2010

Is anyone using live wallpapers on their Evo and if so which one are you using? I'm going to be using them so i am still playing around with the ones that come with the phone.

View 13 Replies View Related

HTC Magic :: Recommended Stock ROM?

Aug 11, 2009

What ROM are you using, and why? Would you recommend it? I personally am using the HoFo community ROM, which is basically the stock Rogers ROM just rooted and has some small optimizations. I like it because it is fast and stable because I believe the core wasn't changed, and it is rooted.

View 17 Replies View Related

Android :: Custom Notifications - Assign Different Notifications To Emails Vs Texts Vs Missed Calls

Jun 21, 2010

My only complaint about the Droid is the seeming lack of options for notifications.

Is there a way, or an app, that would allow you to assign different notifications to emails vs texts vs missed calls?

Also, does anyone know if there's a way to set the phone to re-notify you periodically if you have a notification that has not been looked at? I tend to leave my phone sitting on my desk at work and would like it to let me know if I missed a call or text while I was away from my desk.

Ideally I'd like to silence email notifications, but have text and missed call notifications with unique ring tones for each, and I'd like the phone to renotify me every 10 minutes or so if I have a text or missed call waiting for me.

View 3 Replies View Related

HTC Incredible :: Recommended ROMS For The Indredible

Jun 24, 2010

just wondering wat the best roms are for the incredible. U can right ur opinions here and i want to see which roms i want to use :3

View 6 Replies View Related

Motorola Droid :: Most Recommended / Vanilla ROM?

May 27, 2010

Is there a recommendation for a 'relatively straight forward' ROM that's not over the top but provides for the overclock while active/under clock while sleeping? I am considering rooting, but that's only the tip of the iceburg. Picking a decent ROM is next - and I really don't want to grab anything hairy.

View 20 Replies View Related







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