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: setContentView(R.layout.saveimage); //Intent i = new Intent(anyView.getContext(), AndroidWebImage.class); Intent i = new Intent(arg0.getContext(), AndroidWebImage.class); i.putExtra("ImagePosition", picurepos); startActivity(i); Which loads up the new page fine, but then causes a error and forces close. When playing about with the code of the java file i am going to, which is: Intent intent = getIntent(); //int position = intent.getIntExtra("ImagePosition", -1); //String picposition = Integer.toString(position); -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en