从代码启动android应用程序
我需要从我的代码简单地启动一个应用程序,例如 Skype 或其他应用程序。 我在互联网上阅读了一些帖子,但没有解决方案。 我尝试了这个方法:
Intent startApp = new Intent("com.android.gesture.builder");
startActivity(startApp);
我在try/catch blokk中写了这个,LogCat告诉我:ApplicationNotFound异常由Intent处理。我在 Android 开发者网站上阅读了“Hello”教程,但它对我的解决方案来说太复杂了...... 我无法将此应用程序启动活动注册到我的清单文件中。 我想我需要实现一个从 Activity 扩展的新类,并实现上面的代码,然后再试一次? 请帮助我,如何从我的主要活动轻松启动其他应用程序...
I need simple start an application from my code, like Skype, or other one.
I read some thread, on the internet, but I haven't solution.
I tried this methode:
Intent startApp = new Intent("com.android.gesture.builder");
startActivity(startApp);
I wrote this in try/catch blokk, and the LogCat told me: ApplicationNotFound exception handled by Intent. I read the "Hello" tutorial on the Android Developers site, but it's too comlicated, to my solution...
I can't register this application starting activity to my manifest file.
I think I need to implement a new class, that extends from Activity, and implement, the code above, and try again?
Please help me, how can I start other application from my main activity easy...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你就快到了!:
你只需要提供你想要的应用程序的包和类。
ComponentName
我也刚刚看到你可以用第二种方法:
参见: SOQ参考
You were nearly there!:
You just need to supply the package and class of the app you want.
ComponentName
I also just saw you can do it a second way:
See: SOQ Ref