Android :: Prevent Saving Browser Pages In Activity Stack History?

Oct 27, 2010

1. User click one button on Activity#1 to start Activity#2.

2. One button on Activity#2 start system default browser(Intent.ACTION_VIEW) to get Twitter authorized.

3. After user allow, Twitter redirect user to Activity#2(Custom intent- filter+data) and it save the tokens.

Now, if I press back key, the app back to browser, how to prevent this and return to Activity#1? Try several Intent.Flag before start browser with no luck.

Android :: prevent saving browser pages in activity stack history?


Android :: Opening Browser Activity / Prevent It From Being In Activity History

Aug 12, 2010

I'm working on an app that launches the browser activity to perform a Twitter OAuth authorization. This process uses a callback url which will re-launch the activity that started the browser activity in the first place.My problem is that the browser pages remain in the history stack and when the user then clicks back from the preferences activity that launched the browser in the first place, they don't go back to the app's main activity, but instead are brought back to the browser. I've tried adding flags to the launching intent to prevent history and reset on clear, but it doesn't seem to work when running on my phone, only on the emulators.

View 1 Replies View Related

Android :: Activity History Stack

Aug 1, 2009

I have 3 activities, I want to allow only one of each of the activities to be on the history stack at one time.A>B>C>[GO TO B] gives me A>C>B using FLAG_ACTIVITY_REORDER_TO_FRONT flag.Now the problem is that when I call B from C I want B to be restarted not just brought to the front.how can I do that?

View 3 Replies View Related

Android :: Enumerate Activity History Stack

Dec 17, 2009

When debugging I've sometimes wanted a tool that would list running tasks and show which activities are on the history stack for each task. I can get a list of tasks by calling ActivityManager.getRunningTasks(). Each ActivityManager.RunningTaskInfo object in the list gives me interesting information such as the base activity, top activity, and number of activities in the task. I haven't found a way to actually enumerate all the activities in the task's history stack. Is there a way to get at such information?

View 2 Replies View Related

Android :: Remove An Activity From History Stack

Dec 14, 2009

My app shows a signup activity the first time the user runs the app, looks like:

ActivitySplashScreen (welcome to game, sign up for an account?)
ActivitySplashScreenSignUp (great, fill in this info)
ActivityGameMain (main game screen)

so the activities launch each other in exactly that order, when the user clicks through a button on each screen.

When the user goes from activity #2 to #3, is it possible to wipe #1 and #2 off the history stack completely? I'd like it so that if the user is at #3, and hits the back button, they just go to the homescreen, instead of back to the splash screen.

I think I can accomplish this with tasks (ie. start a new task on #3) but wanted to see if there was simpler method.

View 3 Replies View Related

Android :: Check If Any Items On History / Activity Stack?

Nov 16, 2009

I'm trying to figure out if there's any way to see if there is anything on the history stack so I can programatically display a Back button or not.

I tried getting the RunningTaskInfo to get the num of activities but it doesn't seem to work quite right for what I need. Does anyone know of another way?

View 2 Replies View Related

Motorola Droid 2 :: Saving Web Pages From Google Browser

Nov 29, 2010

Is there a way to save web pages for browsing later especially when there is no internet connection?

View 2 Replies View Related

Android :: Activity History Stack Wrong Upon First Install On Device

Dec 4, 2009

Edit / Update:

As an update to the below problem, I found the exact action which causes it to happen.

Download an apk from a url through the android browser
Install the app.
After install, the app gives you two choices: "Open" or "Done".
If you choose "Open", the quirky behavior described below starts.
If you choose "Done", then launch the app from the app tray, it works fine.

So it seems like this problem is caused by using the "Open" button the browser provides you after installing the APK.

I'm experiencing an error in the history stack of applications upon first install. I made a test app to demonstrate this.

The test app is simply two activities, A and B. Activity A launches B. That's all it does. Rest is wizard generated template code from eclipse.

When the user installs the app (via web url apk), and runs it for the first time, I get an out-of-order activity stack:

-User starts the app, A is on top.
-They make A launch B by clicking a button. B is on top of the stack.
-User hits the home screen button.
-User returns to the app, A is displayed, instead of B.
-User hits the back key, B is shown!
-User hits the back key again, A is shown!
-User hits the back key again, home screen shown.
-Now the stack is clean, and app behaves "normally" from now on!

Is any one else seeing this? This is almost exactly like this known bug, however my users are not installing from eclipse:
http://code.google.com/p/android/issues/detail?id=2373&q=first%20%20i...

I can provide the test app/source if anyone wants to try. This is the manifest, which does not have any special customizations made to it. code...

as far as I know, this should definitely not be happening, and works fine after you clear the history stack the first time.

View 1 Replies View Related

General :: Prevent Browser From Saving Tabs?

Mar 15, 2012

How can I prevent the browser from saving the tabs I last had open? It's annoying to open the browser and have stuff from a week ago still there

View 5 Replies View Related

Android :: On Logout Clear Activity History Stack Preventing Back Button

Jun 9, 2010

All activities in my application require a user to be logged-in to view. Users can log out from almost any activity. This is a requirement of the application. At any point if the user logs-out, I want to send the user to the Login Activity. At this point I want this activity to be at the bottom of the history stack so that pressing the "back" button returns the user to Android's home screen.

I've seen this question asked a few different places, all answered with similar answers (that I outline here), but I want to pose it here to collect feedback. I've tried opening the Login activity by setting its Intent flags to FLAG_ACTIVITY_CLEAR_TOP which seems to do as is outlined in the documentation, but does not achieve my goal of placing the Login activity at the bottom of the history stack, and preventing the user from navigating back to previously-seen logged-in activities. I also tried using android: launchMode ="singleTop" for the Login activity in the manifest, but this does not accomplish my goal either (and seems to have no effect anyway). I believe I need to either clear the history stack, or finish all previously- opened activities. One option is to have each activity's onCreate check logged-in status, and finish() if not logged-in. I do not like this option, as the back button will still be available for use, navigating back as activities close themselves. The next option is to maintain a LinkedList of references to all open activities that is statically accessible from everywhere (perhaps using weak references). On logout I will access this list and iterate over all previously-opened activities, invoking finish() on each one. I'll probably begin implementing this method soon.

I'd rather use some Intent flag trickery to accomplish this, however. I'd be beyond happy to find that I can fulfill my application's requirements without having to use either of the two methods that I've outlined above. Is there a way to accomplish this by using Intent or manifest settings, or is my second option, maintaining a LinkedList of opened activities the best option? Or is there another option that I'm completely overlooking?

View 2 Replies View Related

Android :: Prevent Activity From Saving State When User Selects Back Button

May 2, 2010

I have an Activity with a list that is bound to a ListAdapter reading data into a ArrayList from a database. All is well when the data is first loaded. While the Activity is open and the list is being displayed it is possible and likely that the data in the database will be updated by a service but the list does not reflect the changes because the ArrayList does not know about the changes. If the Activity is no longer in the foreground as would be the case if the user goes to the home screen and then is brought back to the foreground I would like for the Activity to not display what it did prior but rather reload the data using the ListAdapter the view is bound to. I think something needs to call finish() but I am not sure what.

This is what I have in the Activity.

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

View 1 Replies View Related

Android :: Clear Entire History Stack And Start A New Activity On Android

Aug 13, 2010

Is it possible to start an activity on the stack, clearing the entire history before it? The situation I have an activity stack that either goes A->B->C or B->C (screen A selects the users token, but many users only have a single token). In screen C the user may take an action which makes screen B invalid, so the application wants to take them to screen A, regardless of whether it is already in the stack. Screen A should then be the only item on the stack in my application. Notes There are many other similar questions, but I haven't found anything that answers this exact question. I tried calling getParent().finish() - this always results in a null pointer exception. FLAG_ACTIVITY_CLEAR_TOP only works if the activity is already on the stack.

View 1 Replies View Related

Android :: Prevent Duplicate Browser / Activity Launching

Jun 29, 2010

I would like to know if there is a way of preventing a duplicate launch of browser/activity, while the user is already focused on it.mybe there is a way to detect before if the user's current screen is already focused on the same activity/browser i intent to launch?

View 2 Replies View Related

Android :: Stack Of Activity From Activity Stack

Nov 2, 2009

There is a stack of activity i want to call the activity from that stack , My question is that is it possible to check from that stack and call that intent.When i press home button and again when i press the executable it should start the activity where i have left .Is it possible?Any example related to the same would be great help

View 3 Replies View Related

General :: Restore ICS Browser Bookmarks / Saved Pages To Jelly Bean Browser?

Jul 4, 2012

I used Titanium Backup to backup my apps with data and system files. How do I restore those bookmarks and saved pages?

View 2 Replies View Related

Android :: How To Clear Activity Stack If Using Same Activity Multiple Times?

Mar 3, 2010

So I have an app with Activity A. The layout on the activity is dynamic genearted. So it's possible that on Activity A a user hits a button that goes to "A" and the new page looks different, then a user clicks another button to go to "A" again. Now I have 2 Activities in the history stack. A, A, and currently on A. Is it possible that if a user clicks a button that the whole Activity stack is cleared in a scenario such as this?

View 5 Replies View Related

Android :: Finish Any Previous Activity In Stack From Current Activity?

Apr 27, 2010

How to finish any previous activity in application stack (at any level , I mean not immediate parent) , from current activity like on some particular event I want to invalidate this previous activity?

View 1 Replies View Related

Android :: Retain Only One Copy Of An Activity On Stack When Called From Non Activity

Jul 26, 2010

How can I make sure I only retain one copy of an activity on the stack when called from non-activity? When called from an activity I can just add the FLAG_ACTIVITY_REORDER_TO_FRONT flag to the Intent, but how can I do this from e.g. a widget or a notification?

View 1 Replies View Related

Android :: How To Clear All Activity In Stack Below Latest Activity?

Dec 22, 2009

All the current discussions involves clearing all activites above an existing activyt, but I'm trying to find a way to clear all the activities before the latest activity in the stack. So my scenario is A -> B -> C and then when a user goes to Activity D, activies A,B,C should be cleared from the activity stack. FLAG_ACTIVITY _CLEAR_TOP seems to only clear any activites above an existing activity. Anybody run into this scenario and found a solution?

View 4 Replies View Related

Android :: Clear Activity Stack And Replace With A New Activity

Sep 17, 2009

i want to clear the activity stack and replace it with a new activity as the root activity, even if that activity exists somewhere on the stack (or not). i see FLAG_ACTIVITY_CLEAR_TOP and FLAG_ACTIVITY_NEW_TASK, but it's not obvious to me how to use those in conjunction to achieve what I want. it's like i want to completely restart the task with some activity that i specify as the new root.

View 9 Replies View Related

Android :: Make A Particular Activity As A Root Activity In Stack

Aug 4, 2009

i have a set of activities on my stack Say A-->B-->C. when i launch the activity named 'D' it should get fired as the root activity of my application and all the other activities(A,B,C) should get cleared from my stack once Activity D is launched.Can any one tell me as how to do this

View 4 Replies View Related

Android :: Strange Activity Stack Behavior When Using Map Activity

Apr 23, 2010

I have the following activity structure in my application A simple "splash screen" activity is started when the application is fired up (let's call it "Splash"). This activity starts the main activity when the user presses a button (I will call it "Main"). Main can in turn start two activities from the menu. The first activity presents a simple form (let's call this one "Form"), the second is a MapActivity that presents a map (it is called "Map").
Main, Form, and Map are declared exactly the same in the manifest:
<activity android:name="fully qualified activity class"
android:screenOrientation="landscape"
android:configChanges="keyboard|keyboardHidden|orientation"
> <intent-filter>
<action android:name="android.intent.action.DEFAULT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter> </activity> When Main is active and I start Form and press "back", Main comes up again. Pressing "back" again brings up "Splash". Nothing strange here.Now comes the strange part: when I am in Main, start Map, and press "back", Main comes up as expected. But pressing "back" again just restarts Main. A second press on "back" is needed to bring me back to Splash!So it seems that starting the Map activity somehow results in Main ending up on the activity stack twice while starting the Form activity does not! Both Form and Map are started like this: start Activity(new Intent(this, MyActivity.class)); I don not catch the back key in any activity.Any clues on what is going on or how to debug this?

View 1 Replies View Related

Android :: Closing More Than One Activity In Activity Stack

Nov 4, 2009

I'm new android and i want to know how to remove more than one activity from stack. We use finish() for closing particular activity but i wanna close more than one activity underneath it, at a time.

View 2 Replies View Related

Android :: Start Activity And Clear Activity History

Apr 22, 2010

I have a huge maze of activities in my application. What I need to do, is that when the user logs in into the system, the activity history should be cleared. I cant just use finish() when I start a new activity, because I want the activities to have a history until the user logs in. I have experimentet with the different flags when starting an activity, but I have had no success.

View 1 Replies View Related

Android :: Dolphin Browser Constantly Reloading Pages

Sep 19, 2010

I have a rooted Droid X running the original 2.2 leak and have been using Dolphin Browser HD since I got it. Lately I noticed every time I go back to the browser after "minimizing" it, it reloads the pages that were open. Now, I could be completely crazy and it could have been doing this the entire time I've used it but I feel like this is something new. It's quite annoying actually, as I have to wait every time I pull the browser back up. I can't point at anything that recently changed that could have affected it, I even uninstalled and reinstalled it to try and fix it but to no avail.

Am I the only one this happens to? Am I crazy and it has been happening the whole time and I only just noticed it? When is the droid x 2.2 official OTA coming out!

View 4 Replies View Related

Android :: Can Browser Load From Local Server To View Pages?

Apr 6, 2009

Can one use an Android phone to access basically local (think intranet for example) web servers to view pages? I ask this question because some cell phones with some phone network appear to use a special server to funnel cell phone requests thru and that the server offloads from the browser part of what a browser normally does. I get the impression that the Opera mobile browser works this way.I want to talk to local devices that serve web pages and connect directly to them from phones. Does the Chrome browser in Android have the full functionality that Chrome has on a PC? Can it parse HTML, do XMLHttpRequest, and otherwise act like a modern browser?

View 2 Replies View Related

Android :: Pages Activity Or Layout

Oct 5, 2010

My app Consists an intro page with "Start", "About", etc..

I managed to create a functional version of the app by having the "Start" button call a new layout in which a new onclick listener is defined.

This doesn't seem clean to me that I@m defining a new onClick listener for each Layout I use and wonder how the correct way would be to create individual pages (including my "About" and any other screens I implement).

View 1 Replies View Related

Android Activity - Multiply Pages?

Mar 13, 2013

I have just finished my first android app in Eclipse. It is an app, which contains more activities, more pages. Everything seems to work when I click on the button I go to an other page. And back.

Now the problem is, when I export the android app as an .APK file. Drag it to my tablet and install it with Astro File Manager, all the activity's come on the application screen as different apps.

Every activity has its own icon (like 80 different activities) . But when I click on any activity icon, the app works perfectly.I only want 1 application icon that starts with the main activity.I thought there was something wrong in my AndroidManifest.xml file so I putted a little bit of the code below.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="schemas.android.com/apk/res/android"
package="com.evi.TerrazzaIlfb"[code].....

View 2 Replies View Related

Android :: Clear Activity Stack?

Nov 3, 2009

Is there a way to clear our Activity stack? For example, a user in my app progresses through these activities, one is launched from the previous activity: ActivityA -> ActivityB -> ActivityC if the user is now looking at ActivityC, and they hit the back button, they will go back to ActivityB. Is it possible to add a menu to ActivityC where the user can clear their activity stack, and then launch a new instance of ActivityA? This would be so the user can jump to a particular activity in my application without getting confused with the back button + history,

View 4 Replies View Related

Android :: Activity Stack Not Preserved

Mar 10, 2010

My main activity A has as set android:launchMode="singleTask" in the manifest. Now, whenever I start another activity from there, e.g. B and press the HOME BUTTON on the phone to return to the home screen and then again go back to my app, either via pressing the app's button or pressing the HOME BUTTONlong to show my most recent apps it doesn't preserve my activity stack and returns straight to A instead of the expected activity B.Is there a setting I'm missing or is this a bug? If the latter, is there a workaround for this until the bug is fixed?

View 5 Replies View Related







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