1

I just got stuck into a problem, which i can't reproduce on Simulator. When i install the .apk on the phone, after the splash screen the application stops.It did not do that before and i did not change in the Splash code. This is the class by they way:

/**
 * <p>Application Splash Screen</p>
*/

public class Splash extends Activity { private static final int SPLASH_DELAY_TIME = 400;

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.splash);
    HorsensAppUtils.onActivityCreateSetTheme(this);

    new Handler().postDelayed(new Runnable() {
        public void run() {

            Intent intent = new Intent();
                intent.setClass(Splash.this, HorsensAppActivity.class);
                Splash.this.startActivity(intent);
                Splash.this.finish();
                overridePendingTransition(R.anim.mainfadein,
                        R.anim.splashfadeout);

        }
    }, SPLASH_DELAY_TIME);
}

 public boolean onKeyLongPress(int keyCode, KeyEvent event) {
     if (keyCode == KeyEvent.KEYCODE_BACK) {
         Splash.this.finish();
     }
     return super.onKeyLongPress(keyCode, event);
 }       

}

Not sure which way to go, as on simulator the app starts. Anyone gone through this stuff before? This was not a problem before, and i modified code in the application, but different parts. In simulator log i see this messages:

[2011-12-12 04:30:03 - Emulator] D/AndroidRuntime(  392): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
[2011-12-12 04:30:03 - Emulator] D/AndroidRuntime(  392): CheckJNI is ON
[2011-12-12 04:30:04 - Emulator] D/AndroidRuntime(  392): --- registering native functions ---
[2011-12-12 04:30:05 - Emulator] D/ddm-heap(  392): Got feature list request
[2011-12-12 04:30:06 - HorsensApp] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.android.x.app/.XAppActivity }
[2011-12-12 04:30:06 - Emulator] I/ActivityManager(   66): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.android.horsens.app/.XAppActivity }
[2011-12-12 04:30:06 - Emulator] W/ActivityManager(   66): Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.android.x.app/.XAppActivity } from null (pid=-1, uid=-1) requires null
[2011-12-12 04:30:06 - HorsensApp] ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.android.horsens.app/.XAppActivity } from null (pid=-1, uid=-1) requires null
[2011-12-12 04:30:06 - Emulator] I/AndroidRuntime(  392): AndroidRuntime onExit calling exit(1)

Thx either way.

Gabriela Radu
  • 757
  • 2
  • 12
  • 33
  • I cannot reproduce the same situation, the log above is a part of what i could read in console. Trying to understand why the i don't get an error in simulator. – Gabriela Radu Dec 12 '11 at 05:52
  • You might want to check this out: http://stackoverflow.com/questions/4162447/android-java-lang-securityexception-permission-denial-start-intent – Vikram Bodicherla Dec 12 '11 at 09:37

0 Answers0