Post Reply

Question [Q] Notification-management on Gear

OP sinoplu57

22nd January 2014, 03:56 PM   |  #1  
OP Junior Member
Thanks Meter: 0
 
5 posts
Join Date:Joined: Jan 2014
Hi @ all !

Well, first of all, I want to catch the notifications coming up from a Galaxy S4 to the Galaxy Gear, and maybe store them in a file on the Gear.
Also storing on the coupled phone (S4) would be OK. (Everything only for research-reasons.)

My Problem is: I think I have no access to a notification manager on the gear. My mini-app works on my S4. There, I can throw a notification through a service. But on the Gear, nothing happens. So I thought, that maybe the Gear has another way to manage the notifications but I didn't get it.

Any ideas?

SW: V700XXUAMK7
Galaxy S4: Android 4.3
GM: 1.5.123002
22nd January 2014, 11:13 PM   |  #2  
I don't really understand.


The notifications received on the gear are the same as those that appear in the notification dropdown on the phone - could you not just get that info?


On the gear, they are stored in a database. There is a notification counter and list widget available in this forum by st-tps that may be of help
23rd January 2014, 02:03 PM   |  #3  
OP Junior Member
Thanks Meter: 0
 
5 posts
Join Date:Joined: Jan 2014
Quote:
Originally Posted by Brendo

I don't really understand.

Sorry, I'm sure, it's my fault. First of all, thank you for replying. I'm feelin' so lonely considering this topic...

Quote:
Originally Posted by Brendo

The notifications received on the gear are the same as those that appear in the notification dropdown on the phone - could you not just get that info?

Well, in Gear Manager you can choose notifications that should receive on Gear. So there are notifications on the dropdown of the phone, which do not arrive on the gear because you did not activate a certain app on GM. I only need the notifications arrived/arriving on the gear.

Quote:
Originally Posted by Brendo

On the gear, they are stored in a database. There is a notification counter and list widget available in this forum by st-tps that may be of help

If I am right, this widget shows me the last notifications. But I need to handle the notifications on my own "app" because every notification should be evaluated by the user. So I need an interface or the like.

So I suppose, that on the Gear, there is no "notification manager" but a database. But how to access this DB?
23rd January 2014, 04:27 PM   |  #4  
Quote:
Originally Posted by sinoplu57

If I am right, this widget shows me the last notifications. But I need to handle the notifications on my own "app" because every notification should be evaluated by the user. So I need an interface or the like.

So I suppose, that on the Gear, there is no "notification manager" but a database. But how to access this DB?

Correct, it just show the last 6 arrived notifications.

The Notifications is stored in a regular SQL db located at /data/data/com.samsung.appcessory.NotiConsumerService/databases/NotificationSync.db
However Samsung doesnīt close the db correctly as they use it so you canīt just read it. you have to copy the .db, .db-shm and the .db-wal to an asset directory, open it yourself and then close the sql to be able to read it compleatly.

What kind of app are you planning to do?
The Following User Says Thank You to st-tps For This Useful Post: [ View ]
23rd January 2014, 04:41 PM   |  #5  
OP Junior Member
Thanks Meter: 0
 
5 posts
Join Date:Joined: Jan 2014
thxx
Quote:
Originally Posted by st-tps

Correct, it just show the last 6 arrived notifications.

The Notifications is stored in a regular SQL db located at /data/data/com.samsung.appcessory.NotiConsumerService/databases/NotificationSync.db
However Samsung doesnīt close the db correctly as they use it so you canīt just read it. you have to copy the .db, .db-shm and the .db-wal to an asset directory, open it yourself and then close the sql to be able to read it compleatly.

What kind of app are you planning to do?

I have to provide the Gear-User with a function, that allows him/her to give feedback about each notification. So I thought, that I could "catch" the notification coming up from the phone, and throw it on my own way. E.g. forcing a new activity to be shown, which shows the coming up notification, and maybe 2 buttons for feedback. Then storing this feedback anywhere...

So: The user does NOT see the "original" notification but only "my" notification with feedback-possibility.

Is that understandable?

On the phone, this would be easier. I could user the notification management and the NotificationListenerService..
But DB's which have to been copied first and closed than to be able to use.. sounds very complicated..
23rd January 2014, 05:14 PM   |  #6  
Quote:
Originally Posted by sinoplu57

I have to provide the Gear-User with a function, that allows him/her to give feedback about each notification. So I thought, that I could "catch" the notification coming up from the phone, and throw it on my own way. E.g. forcing a new activity to be shown, which shows the coming up notification, and maybe 2 buttons for feedback. Then storing this feedback anywhere...

So: The user does NOT see the "original" notification but only "my" notification with feedback-possibility.

Is that understandable?

On the phone, this would be easier. I could user the notification management and the NotificationListenerService..
But DB's which have to been copied first and closed than to be able to use.. sounds very complicated..

I donīt think itīs possible to stop the original notification from showing, all stock apps seams kinda locked up.
The latest notifications isnīt fully inserted in the db and is stuck somewhere in the db-wal and the db-shm files (temp files) so if you just open the .db file, the latest notifications is missing.
So when you copy the three files, open the db and close it again the temp files is injected in the original db and all notifications is available.

This is the best way I found so far, Iīm not that into SQL so it might be better ways...
The Following User Says Thank You to st-tps For This Useful Post: [ View ]
23rd January 2014, 06:05 PM   |  #7  
OP Junior Member
Thanks Meter: 0
 
5 posts
Join Date:Joined: Jan 2014
Quote:
Originally Posted by st-tps

[...]
So when you copy the three files, open the db and close it again the temp files is injected in the original db and all notifications is available.

This is the best way I found so far, Iīm not that into SQL so it might be better ways...

Thank you so much, st-tps. I hope there is another, much more comfortable way..

But about the DB: How many notifications backwards are stored in db? How "big" is the history, I mean the number "old notifications" in the db. When is the db cleaned?

I feel like: Galaxy Gear is a big black box and only 5 people in the world know, how it works..
23rd January 2014, 06:52 PM   |  #8  
Quote:
Originally Posted by sinoplu57

Thank you so much, st-tps. I hope there is another, much more comfortable way..

But about the DB: How many notifications backwards are stored in db? How "big" is the history, I mean the number "old notifications" in the db. When is the db cleaned?

I feel like: Galaxy Gear is a big black box and only 5 people in the world know, how it works..

Neither less, the SQL db needs to be closed for the temp files to be correctly injected in the db, and since the stock app locks the db you canīt open it in its original directory. Atleast I havenīt any success...

The db contains the amount of notifications that you can see in the stock app, I havenīt seen any signs of a "roof" for the count.
If you compleatly delete the db files and reboot, you will end up with an empty stock app and some newly created db files.

We have to start somewhere to dig in this black box, itīs pretty exciting
31st March 2014, 05:54 AM   |  #9  
Senior Member
Thanks Meter: 19
 
117 posts
Join Date:Joined: Mar 2014
Have you figured out how to manually populate the notification db?

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes