Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I start an intent from a card in Google Glass

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?

like image 824
Raffaele Castagno Avatar asked Oct 21 '22 01:10

Raffaele Castagno


1 Answers

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.

like image 99
Tony Allevato Avatar answered Oct 24 '22 03:10

Tony Allevato