The error I get is "The Application has stopped unexpectedly. Please
try again", but it only happens as if I use tthe following 2 lines:
            Intent intent = getIntent();
            int position = intent.getIntExtra("ImagePosition", -1);

If I create the variable in this activity and blank those lines out it
works, but I need the variable bringing accross.

On 2 Aug, 14:52, TreKing <> wrote:
> On Mon, Aug 2, 2010 at 5:14 AM, Justin <> wrote:
> > I am writing a app, and basically I want to carry accross a variable
> > from one java file to another.
> > So from my first java file I am calling the second one by:
> Just to clarify, a "java file" is something you edit, not something your
> "call" or "carry variables across". Those are instances of your Activity.
> > Which loads up the new page fine, but then causes a error and forces
> > close.
> And the error and force close message would be what?
> ---------------------------------------------------------------------------­----------------------
> TreKing <> - Chicago
> transit tracking app for Android-powered devices

You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

ATTENTION: Android-Beginners will be permanently disabled on August 9 2010. For 
more information about this change, please read [] or visit 
the Group home page.

Try asking and tagging your question on Stack Overflow at

To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to