android - Sony SmartWatch - invoke app on Smart Watch when it gets an event -


i'd write app monitors incoming sms , notify me on watch if content of sms contains predefined text (e.g. "go home").

i know can use notification api add event. vibrate , show small app icon on watch. if want use control api flash led , show whole text , image on watch when receives sms, how should do?

it's similar "call handling" add-on. can sony open source of "call handling" reference?

i think have 2 options. either, say, 1) implement extension uses both notification api , control api. or 2) implement control extension.

for 1), add custom action starts control extension using start_request intent below. see doaction1 method in samplenotificationextension code. mean standard notification shown on watch, able present custom view user, if user clicks custom action button.

and 2), implement functionality control extension , request started when smss found filter. drawback need present sms text yourself, in case 1) done framework you.

start_request-intent example:

intent intent = new intent(control.intents.control_start_request_intent); intent.putextra(control.intents.extra_aea_package_name, "your.package.name"); intent.setpackage(hostapppackagename); sendbroadcast(intent, registration.hostapp_permission); 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -