Hey guys,
I've got a float array camObjCoord
declared as..
public static float camObjCoord[] = new float[8000];
I'm then filling it's indexes in a class that does something like the following..
camObjCoord[1] = 2.5;
I'm then calling makeview()
public void makeview() {
Intent myIntent = new Intent(this, GLCamTest.class);
this.startActivity(myIntent);
Bundle b = new Bundle();
b.putFloatArray("tweets", camObjCoord);
}
and then in the new class it's doing...
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle b = this.getIntent().getExtras();
float original[] = b.getFloatArray("tweets");
camObjCoord = original;
counter++;
}
But... I'm getting a Null pointer Exception at float original[] = b.getFloatArray("tweets");
and I don't know why. I've tried bundling before calling the intent etc. but I've had no luck at a fix. Anyone know why?
I've also included some of the error incase any of you are interested.
07-14 11:14:35.592: ERROR/AndroidRuntime(7886): Caused by: java.lang.NullPointerException
07-14 11:14:35.592: ERROR/AndroidRuntime(7886): at org.digital.com.GLCamTest.onCreate(GLCamTest.java:41)
07-14 11:14:35.592: ERROR/AndroidRuntime(7886): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
07-14 11:14:35.592: ERROR/AndroidRuntime(7886): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
07-14 11:14:35.592: ERROR/AndroidRuntime(7886): ... 11 more
Thanks!