[英]android.content.ActivityNotFoundException: No Activity found to handle Intent - From Service
I'm facing the following error when trying to open activity from my Service. 尝试从我的服务打开活动时遇到以下错误。 The exception is: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.sygic.aura flg=0x10000000 } 例外是:android.content.ActivityNotFoundException:未找到处理意图的Activity {act = com.sygic.aura flg = 0x10000000}
I'm trying to open some internal package "com.sygic.aura", and I don't even know if it has intent filter( if it doesn't - is there another way to open app?). 我正在尝试打开一些内部软件包“ com.sygic.aura”,我什至不知道它是否具有意图过滤器(如果没有,还有其他方法可以打开应用程序吗?)。
This is the code: 这是代码:
Intent intent = new Intent(package);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
Please help 请帮忙
The problem was that I didn't send URL-location for the activity: 问题是我没有发送活动的URL位置:
private Uri location = Uri.parse("geo:0,0?q=1600+Amphitheatre+Parkway,+Mountain+View,+California");
Intent intent = new Intent(Intent.ACTION_VIEW, location);
intent.setPackage(defaultGpsPackage);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
That way it works! 这样就可以了!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.