Hi guys,
I got this class, and nothing inside the onCreate is happening? Does it not automatically get called upon initialization?
Code is below, Thanks alot! - Micheal
package com.michealbach.livedrops;
import java.io.IOException;
import java.util.List;
import java.util.Locale;
import android.app.Activity;
public class AnyClass extends Activity {
double latitude = 0;
double longitude = 0;
String addressString = "Address Initialized";
String postalString = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
postalString = "Why doesn't this String change happen at all?";
}
public double getLongitude() {
return longitude;
}
public double getLatitude() {
return latitude;
}
public String getAddress() {
return addressString;
}
public String getPostal() {
return postalString;
}
}
Doing this results in a "application has stopped unexpectedly. Please try again". If I initialize the string to some set of characters instead of null, it'll just stay that way. Should it not do what is inside the onCreate() and make that change?