Question

I have just started to create notification for my extension. The first thing I do is try to see from sample notification extension. As I run it, I saw in events is like this:

http://s14.postimg.org/yzh8z78ht/SC20131014_084520.jpg

I saw from Sony documentation (smart emulator overview), it should be like this: http://s11.postimg.org/imwn7cw9f/event.png

I don't know what I suppose to see from the sample notification. Anybody know how the sample works? In documentation, it said that:

A notification Smart Extension app is an Android application which communicates with Smart Connect and inserts events in its notification content provider to be displayed on compatible accessories.

From that statement, do I have to build another application for showing the notification from my application? Right now I have phone application that can send the information (in String) from smartphone to extension. I want to show notification when the value is received. So,do I have to make separate application? Or just add some method to build the notification inside my current extension?Anybody knows?

Was it helpful?

Solution

First of all, it seems you are working with the old Smart Extension SDK - you should upgrade to the Sony Add-on SDK v2 to get the newest APIs for the newest Sony Mobile accessories, and the updated emulator.

Regarding your question(s) - the way the notification API basically works, you add notifications to the Smart Connect notification database via a Content Provider. Once the notification has been added, all connected Sony Smart accessories will display the notification. To add this functionality to your application, you can go about it in two ways:

  1. Add the extension functionality to your already existing app. By doing this, you will not need to send the String (that you mention) between app processes.
  2. Create a separate notification extension which takes the information from your app.

For both implementations, you can use the SampleNotificationExtension project that is included in the SDK to start your work from.

Hope this helps, cheers!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top