I am trying to pass an array of type Coordinates (coordinate[] arrCoordinates) to another Activity class. I find it easy to pass Strings and Ints (e.g intent.putExtra("string", myString); but I can't seem to pass an array of coordinates. I also tried looking into using Parcelable..but I'm not quite sure on coding it. Could anyone help me out?
Asked
Active
Viewed 277 times
1 Answers
1
In these situations, I have always used the Application
class to store global variables.
See this answer for more information.
A dirty hack (which I do not recommend) is to make your array a public static member of your first Activity
class in order to easily grab a reference into your new Activity
.