带有AM命令的Android Osmand API
在我的Android手机上,我想使用 osmand> osmand API 。要发送意图,我想使用ADB Shell或Termux中可用的am
命令。
我能够使用am启动osmand start net.osmand.plus/net.osmand.plus.activities.mapactivities.mapactivity
在我的第一个测试中,我只想停止导航(命令:stop_navigation < /代码>)。
首先,我尝试了am启动-a stop_navigation -n net.osmand.plus/net.osmand.plus.activities.mapactivity
。结果是开始:intent {act = stop_navigation cmp = net.osmand.plus/.activities.mapactivity}警告:未启动活动,其当前任务已将其带到了Front
,这很有意义。
然后我测试了一些广播命令,例如:
am广播-a stop_navigation -n net.osmand.plus/net.osmand.plus.plus.activities.mapactivities.mapactivity
am backcast osmand.api:// stop_navigation:// stop_navigation
我还用大写字母对其进行了测试。但是没有成功。
是否有人在Android意图和 /或Osmand API方面拥有更多的经验,并且可以帮助我如何创建工作命令?
提前致谢!
on my android phone I want to control osmand using the osmand api. To send the intents I want to use the am
command available in adb shell or termux.
I am able to start osmand with am start net.osmand.plus/net.osmand.plus.activities.MapActivity
In my first test I just want to stop the navigation (command: STOP_NAVIGATION
).
First I tried am start -a stop_navigation -n net.osmand.plus/net.osmand.plus.activities.MapActivity
. The result was Starting: Intent { act=stop_navigation cmp=net.osmand.plus/.activities.MapActivity } Warning: Activity not started, its current task has been brought to the front
, which makes sense.
Then I tested some broadcast commands, e.g.:
am broadcast -a stop_navigation -n net.osmand.plus/net.osmand.plus.activities.MapActivity
am broadcast osmand.api://stop_navigation
I also tested it with capital letters. But no command was successful.
Is there someone which has more experiences with android intents and / or osmand api and can help me how to create a working command?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经找到了解决方案,比预期的要简单。也许我可以帮助某人使用该解决方案:
命令
am start osmand.api:// pape_navigation
就足够了。顺便提一句:
termux-open osmand.api:// pape_navigation
也有效。I already found the solution, it was simpler than expected. Maybe I can help someone with the solution:
The command
am start osmand.api://pause_navigation
is enough.BTW:
termux-open osmand.api://pause_navigation
does also work.