Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,769,820 Members 49,883 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Notification-management on Gear

Tip us?
 
sinoplu57
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Jan 2014
Question [Q] Notification-management on Gear

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
 
Brendo
Old
#2  
Brendo's Avatar
Senior Member
Thanks Meter 516
Posts: 2,355
Join Date: Oct 2006
Location: Brisbane, Australia

 
DONATE TO ME
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
Samsung Galaxy S IV (i9505) | 16GB
[ROM: Stock KK 4.4.2 | XXUFNC9 | MODEM GSM/LTE: XXUEML4/XXUFMC9 | BL: PRE-KNOX | K: ADAM | RECOVERY: PhilZ]
DOMINATION | XPOSED

OTHER DEVICES:
 
Google Nexus 5 | 32GB
Samsung Galaxy Tab 8.9 (P7310) | 32Gb
[ROM: CM10.2 | CPU: 1.4ghz]
Samsung Galaxy TabPro 10.1 LTE (T525) | 16Gb

Pebble (Kickstarter)
Galaxy Gear (Null_)
Gear Live ()
Google Glass (Explorer)

--------
My Android Downloads
 
sinoplu57
Old
#3  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Jan 2014
Quote:
Originally Posted by Brendo View Post
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 View Post
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 View Post
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?
 
st-tps
Old
#4  
st-tps's Avatar
Senior Member
Thanks Meter 139
Posts: 214
Join Date: Aug 2010
Location: Sweden
Quote:
Originally Posted by sinoplu57 View Post
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?
Gear owners! Download my widgets: NotiCounter Widget and NotiList Widget - Galaxy Gear Exclusives!
For a complete compilation of my Gear Exclusive Apps, check out my External Site.

If you like it and find 'em useful, Iīll gladly recieve a little something

The Following User Says Thank You to st-tps For This Useful Post: [ Click to Expand ]
 
sinoplu57
Old
#5  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Jan 2014
Default thxx

Quote:
Originally Posted by st-tps View Post
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..
 
st-tps
Old
#6  
st-tps's Avatar
Senior Member
Thanks Meter 139
Posts: 214
Join Date: Aug 2010
Location: Sweden
Quote:
Originally Posted by sinoplu57 View Post
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...
Gear owners! Download my widgets: NotiCounter Widget and NotiList Widget - Galaxy Gear Exclusives!
For a complete compilation of my Gear Exclusive Apps, check out my External Site.

If you like it and find 'em useful, Iīll gladly recieve a little something

The Following User Says Thank You to st-tps For This Useful Post: [ Click to Expand ]
 
sinoplu57
Old
#7  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Jan 2014
Quote:
Originally Posted by st-tps View Post
[...]
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..
 
st-tps
Old
#8  
st-tps's Avatar
Senior Member
Thanks Meter 139
Posts: 214
Join Date: Aug 2010
Location: Sweden
Quote:
Originally Posted by sinoplu57 View Post
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
Gear owners! Download my widgets: NotiCounter Widget and NotiList Widget - Galaxy Gear Exclusives!
For a complete compilation of my Gear Exclusive Apps, check out my External Site.

If you like it and find 'em useful, Iīll gladly recieve a little something

 
ebart
Old
#9  
Senior Member
Thanks Meter 18
Posts: 112
Join Date: Mar 2014
Have you figured out how to manually populate the notification db?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes