mobile CCTV,mobile surveillance,police body worn cameras

 forgetPW
 registerNow
search
view: 8136|reply: 79

如何通过其他apk直接打开咱们的apk

[copyURL]

3

主题

115

帖子

295

积分

midMem

Rank: 3Rank: 3

积分
295
poston 2020-1-21 09:37 | 显示全部楼层 |阅读模式
1.。Intent startIntent = new Intent();ComponentName componentName = new ComponentName(
        "com.smarteye.mcu",
        "com.smarteye.mcu.BroadcastStartActivity");
startIntent.setComponent(componentName);
startIntent.addFlags(FLAG_ACTIVITY_NEW_TASK);
startIntent.putExtra("package", getPackageName());// 调用者App包名
startActivity(startIntent);
2.Intent intent = new Intent();intent.setAction("mcp.intent.action.MCP_LOGIN");
intent.setPackage("com.smarteye.mcu");
BroadcastLoginInfoEntity loginInfo = new BroadcastLoginInfoEntity();
loginInfo.iProtoType = 0;
loginInfo.szServerAddr = "192.168.0.128";
loginInfo.iServerPort = 9701;
loginInfo.szUserType = "UA";
loginInfo.szEncodeType = "none";
loginInfo.szUserName = "wang";
loginInfo.szPassword = "aaa111";
String value = (new Gson()).toJson(loginInfo);
Log.i("ttt",value);
intent.putExtra("msg", value);
intent.putExtra("package", "com.hao.talkim");
sendBroadcast(intent);
reply

使用道具 report

3

主题

115

帖子

295

积分

midMem

Rank: 3Rank: 3

积分
295
 Owner| poston 2020-5-26 10:32 | 显示全部楼层
已下载了 demo   打开登录 提示认证失败   按照git上的  改了CU_ 删除重装依然提示。
这个有点没明白,我们现在用咱们提供的这个github'上得demo整改 ,就相当于是SDK开发吧?这个也需要提供认证ID吗?
token:23941
这个token是认证ID吗?系统里面查不到。

reply agree 1 Against 0

使用道具 report

60

主题

1410

帖子

5779

积分

Moderator

Rank: 7Rank: 7Rank: 7

积分
5779
poston 2020-1-21 09:39 | 显示全部楼层
马上我们发个我们自己写的代码DEMO给您。
reply agree Against

使用道具 report

3

主题

59

帖子

367

积分

midMem

Rank: 3Rank: 3

积分
367
poston 2020-1-21 09:52 | 显示全部楼层
整理的demo

本帖子中包含更多资源

pls login 才可以下载或查看,没有帐号?registerNow

x
reply agree Against

使用道具 report

1

主题

306

帖子

1087

积分

vipMem

Rank: 6Rank: 6

积分
1087
poston 2020-1-21 09:52 | 显示全部楼层
  1. 你先发送启动Activity广播,然后MCP会回复一个广播"mcp.intent.action.MCP_APP_START",然后你再发送登录广播。
copycode

reply agree Against

使用道具 report

3

主题

115

帖子

295

积分

midMem

Rank: 3Rank: 3

积分
295
 Owner| poston 2020-1-21 10:02 | 显示全部楼层
提示:登录失败:连接失败  
reply agree Against

使用道具 report

3

主题

115

帖子

295

积分

midMem

Rank: 3Rank: 3

积分
295
 Owner| poston 2020-1-21 10:03 | 显示全部楼层
我现在就想调用起咱们的apk   所以我这块需要搭建一个后台服务吗? 还是只要有咱们的apk就行
reply agree Against

使用道具 report

60

主题

1410

帖子

5779

积分

Moderator

Rank: 7Rank: 7Rank: 7

积分
5779
poston 2020-1-21 10:05 | 显示全部楼层
最后有后台smarteye server,这样可直接登录上去,直接进入MCP的六宫格界面;
如果没有可登录的server,那么应该可以拉起MCP,但就停留在登录界面。
reply agree Against

使用道具 report

3

主题

115

帖子

295

积分

midMem

Rank: 3Rank: 3

积分
295
 Owner| poston 2020-1-21 10:09 | 显示全部楼层
直接只点登录按钮的话 没有任何提示 log日志是这样的:other app action:mcp.intent.action.MCP_APP_START    other app sendBroadcast login!
reply agree Against

使用道具 report

60

主题

1410

帖子

5779

积分

Moderator

Rank: 7Rank: 7Rank: 7

积分
5779
poston 2020-1-21 10:12 | 显示全部楼层
这个是运行我们提供DEMO的结果?
reply agree Against

使用道具 report

3

主题

59

帖子

367

积分

midMem

Rank: 3Rank: 3

积分
367
poston 2020-1-21 10:14 | 显示全部楼层
王.studio post on2020-1-21 10:09
直接只点登录按钮的话 没有任何提示 log日志是这样的:other app action:mcp.intent.action.MCP_APP_START  ...

手动打开我们的APK 可以登录上么?
reply agree Against

使用道具 report

creditRule

QQ|wireless surveillance

GMT+8, 2024-4-17 06:02 , Processed in 0.067385 second(s), 22 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

QuickReply backToTop BackToList