[Q] Notification-management on Gear

Search This thread

sinoplu57

Member
Jan 8, 2014
5
0
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

Senior Member
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
 

sinoplu57

Member
Jan 8, 2014
5
0
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...

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.

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? :(
:confused:
 

st-tps

Senior Member
Aug 4, 2010
225
154
Sweden
www.lundsoftwares.se
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? :(
:confused:
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?
 
  • Like
Reactions: sinoplu57

sinoplu57

Member
Jan 8, 2014
5
0
thxx

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? :eek:

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

Senior Member
Aug 4, 2010
225
154
Sweden
www.lundsoftwares.se
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? :eek:

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...
 
  • Like
Reactions: sinoplu57

sinoplu57

Member
Jan 8, 2014
5
0
[...]
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. :good: 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.. :mad:
 

st-tps

Senior Member
Aug 4, 2010
225
154
Sweden
www.lundsoftwares.se
Thank you so much, st-tps. :good: 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.. :mad:

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 ;)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    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? :(
    :confused:
    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?
    1
    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? :eek:

    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...