从命令行终端启动具有其他功能的快捷方式?

时间:2019-02-05 16:45:27

标签: android

如何从终端中的“ am start”命令启动以下意图,以及其他功能:

f=open("a.txt", "r")
if f.mode == 'r':
    contents =f.read()
    f.close()
arr = contents.split(",")
fullnamejson = "END_" + contents + ".json"
print(fullnamejson)
fullname = "END_" + contents
formatted = "{\n  \"id\": \"" + fullname + "\",\n  \"name\": \"END\",\n  \"icon\": \"waypoint-normal.png\",\n  \"x\": " + contents[0] + ",\n  \"y\": " + contents[1] + ",\n  \"z\": " + contents[2] + ",\n}"
print(formatted)

with open(fullnamejson, "w") as text_file:
    print(f'{formatted}', file=text_file)

谢谢。

想通了...

am start -a android.intent.action.MAIN -n com.google.code.apps2org / com.google.code.appsorganizer.shortcut.LabelShortcut --el“ com.example.android.apis.app.LauncherShortcuts “” -2“-用户0

0 个答案:

没有答案