启动第三方app(百度地图)No Activity found to handle Intent
来源:互联网 发布:5g网络股票 编辑:程序博客网 时间:2024/06/14 00:14
在我的app中启动第三方的app,出现问题No Activity found to handleIntent。
我这里启动的是百度地图app,结果在执行startActivity(intent)的时候出现问题,代码如下:
//移动APP调起Android百度地图方式举例
intent = Intent.getIntent("intent://map/marker?" +
"location=" + endLat + "," + endLon +
"&title=" + "到达位置" +
"&content=" + endName +
"&src=com.test|App" +
"#Intent;scheme=bdapp;package=com.baidu.BaiduMap;end");
startActivity(intent);
出现这个问题:
06-13 12:37:55.51025143-25143/com.test E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.test PID: 25143android.content.ActivityNotFoundException: No Activity found to handleIntent { act=android.intent.action.VIEW dat=bdapp://map/marker?location=67.9399074077,117.38033863063305&title=到达位置&content=石头店&src=com.test|App pkg=com.baidu.BaiduMap (has extras) }
atandroid.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1801)
atandroid.app.Instrumentation.execStartActivity(Instrumentation.java:1499)
at android.app.Activity.startActivityForResult(Activity.java:3942)
at android.app.Activity.startActivityForResult(Activity.java:3889)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:748)
at android.app.Activity.startActivity(Activity.java:4213)
at android.app.Activity.startActivity(Activity.java:4181)
atcom.test .chooseMapApp(MapActivity.java:875)
atcom.test .onInfoWindowClick(MapActivity.java:747)
at com.baidu.mapapi.map.b.a(Unknown Source)
at com.baidu.platform.comapi.map.f.onSingleTapConfirmed(Unknown Source)
at android.view.GestureDetector$GestureHandler.handleMessage(GestureDetector.java:280)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5981)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
atcom.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
原因:百度地图有为手机厂商特定的地图apk,其中的报名称可能不是com.baidu.BaiduMap,而是其他的名称,如在三星手机上的三星手机应用商店可以下载百度地图s-pen版就可以验证。
解决办法:启动的时候报名不要写死,从系统包中获取
String packageName = ResolveInfo.activityInfo.packageName ;
//移动APP调起Android百度地图方式举例
intent=Intent.getIntent("intent://map/marker?"+
"location="+endLat+","+endLon+
"&title="+"到达位置"+
"&content="+endName+
"&src=com.test|App"+
"#Intent;scheme=bdapp;package="+
packageName+
";end");
- 启动第三方app(百度地图)No Activity found to handle Intent
- ActivityNotFoundException: No Activity found to handle Intent
- 【Android】 No Activity found to handle Intent.
- No Activity found to handle Intent
- ActivityNotFoundException: No Activity found to handle Intent
- ActivityNotFoundException: No Activity found to handle Intent
- 关于Android使用隐式启动Activity报No Activity found to handle Intent的问题
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- 关于No Activity found to handle Intent的问题
- 隐试意图:ActivityNotFoundException: No Activity found to handle Intent
- Android关于No Activity found to handle Intent的问题
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- android.content.ActivityNotFoundException: No Activity found to handle Intent
- 解决ActivityNotFoundException: No Activity found to handle Intent
- myslq 和 oracle 理解区别
- JavaScript的继承--寄生组合式继承
- 归并排序
- Android 所有Action收集
- kettle资源
- 启动第三方app(百度地图)No Activity found to handle Intent
- uefi和legacy bios的深度剖析
- Android 抓包使用详解(包括windows用filddder和mac用Charles)
- 欢迎使用 Cmd Markdown 编辑阅读器
- 利率问题
- 并发编程学习总结(六) :java 显式锁ReentrantLock使用详解之测试锁与超时
- 怎样高效统计Android开源库的方法数
- Mysql5.6.23免安装配置
- Leetcode 28. Implement strStr()