问题
I've tried this app, Crystal Shopper :
https://crystalshopper.herokuapp.com/
which seems to be able to start an application from a card.
As you can see in this screenshot
https://crystalshopper.herokuapp.com/static/images/barcode_search.png
there seems to be a command called
crystalshopper://open
Source seems unavailable, so I must infer...
Is correct to assume that this is simply an action which, through the Mirror API, tells the server to send a special notification to the device, which is detected by a BroadcastListener, which will then launch the required Intent?
回答1:
If an APK installed on Glass registers a custom URI scheme, Mirror API Glassware can launch it by using a menu item with the OPEN_URI
action. Set the payload
attribute of the menu item to the custom URI and it will launch the appropriate activity when tapped.
来源:https://stackoverflow.com/questions/18790374/how-can-i-start-an-intent-from-a-card-in-google-glass