I'm developing an app that uses minSdkVersion=10 for gingerbread. it is working fine on all gingerbread devices but when I try to run it on 4.0.3 emulator(ICS) it always stops. is there any settings I need to adjust?
here is my manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.das"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="15" />
and the error on logcat is this
02-22 15:03:40.217: E/global(514): Deprecated Thread methods are not supported.
02-22 15:03:40.217: E/global(514): java.lang.UnsupportedOperationException
02-22 15:03:40.217: E/global(514): at java.lang.VMThread.stop(VMThread.java:85)
02-22 15:03:40.217: E/global(514): at java.lang.Thread.stop(Thread.java:1280)
02-22 15:03:40.217: E/global(514): at java.lang.Thread.stop(Thread.java:1247)
02-22 15:03:40.217: E/global(514): at com.example.SpelloGrande.splash$1.run(splash.java:48)
splash activity
public class splash extends Activity {
//how long until we go to the next activity
protected int _splashTime = 3000;
private Thread splashTread;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
final splash sPlashScreen = this;
// thread for displaying the SplashScreen
splashTread = new Thread() {
@Override
public void run() {
try {
synchronized(this){
//duration
wait(_splashTime);
}
} catch(InterruptedException e) {}
finally {
finish();
//start a new activity
Intent i = new Intent();
i.setClass(sPlashScreen, MainActivity.class);
startActivity(i);
stop();
}
}
};
splashTread.start();
}
//Function that will handle the touch
@Override
public boolean onTouchEvent(MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
synchronized(splashTread){
splashTread.notifyAll();
}
}
return true;
}
}