读书人

开启另一个运用

发布时间: 2012-08-28 12:37:01 作者: rapoo

开启另一个应用

private void start(){    Intent intent = new Intent();    try    {        intent.setClassName(getApplicationContext().createPackageContext(            "com.example",        android.content.Context.CONTEXT_IGNORE_SECURITY),            "com.example.ExampleActivity");    }    catch (NameNotFoundException e)    {        e.printStackTrace();    }    startActivity(intent);}

?

读书人网 >移动开发

热点推荐