Return to application from other application

31 views
Skip to first unread message

kevin....@gmail.com

unread,
Mar 19, 2014, 9:19:10 AM3/19/14
to codenameone...@googlegroups.com
I am developing an application which will allow the user to bring up a navigation app.  What I would like to know is how can I resume from the same place in my application when the navigation app exits.  As my app stands now, when I exit navigation it acts like it is re-starting my application instead of resuming.  
Anyone know if this is possible and how?

Thanks.

Shai Almog

unread,
Mar 19, 2014, 1:51:40 PM3/19/14
to codenameone...@googlegroups.com, kevin....@gmail.com
Is this on Android or other platforms?
How are your start/stop methods implemented in the main class.

kevin....@gmail.com

unread,
Mar 19, 2014, 1:59:00 PM3/19/14
to codenameone...@googlegroups.com, kevin....@gmail.com
Currently, android.  Not sure what you mean by start/stop, but here's how I'm calling navigation after I get a point-of-iinterest:
        Display.getInstance().execute("google.navigation:ll=" + c.getLatitude()+ "," + c.getLongitude());

When this returns, I end up back at the main screen of my application, as opposed to the map where I'm exploring points-of-interest.

Shai Almog

unread,
Mar 19, 2014, 2:09:52 PM3/19/14
to codenameone...@googlegroups.com, kevin....@gmail.com
Look in your main class. It has start and stop methods.
Message has been deleted

kevin....@gmail.com

unread,
Mar 19, 2014, 2:15:25 PM3/19/14
to codenameone...@googlegroups.com, kevin....@gmail.com
Only what is generated by the project creation process:

    public void start() {
        if(current != null){
            current.show();
            return;
        }
        new StateMachine("/theme");        
    }

    public void stop() {
        current = Display.getInstance().getCurrent();

Shai Almog

unread,
Mar 20, 2014, 2:59:27 AM3/20/14
to codenameone...@googlegroups.com, kevin....@gmail.com
If you press the home button then return to the app does it restart?
If you go to another app then return does it restart?

Does this reproduce on several android devices or on a specific device?

Generally the OS can kill an application if it consumes too much resources, do you have a background thread/download etc. running?
Reply all
Reply to author
Forward
0 new messages