Sony SmartWatch 2 Control & Notification for the same app possible? - android

I was trying to port my existing app from SW 1 to SW 2 and stumbled upon the limitation that it is not allowed to have notifications and a control for the same app (even when setting LAUNCH_MODE to CONTROL).
As a workaround I tried to register 2 services, one for the notification and one for the control. As they share the same app package name, this didn't work and only the first that registered was available.
Is there a better workaround?
Or will this limitation be addressed in a future update? My app really depends on both, the notifications and the control.

A distant workaround may be to use only the Control, and build some sort of a notification mechanism as part of the Control. I did exactly that in my Log app: https://play.google.com/store/apps/details?id=eir.log
The notification mechanism is triggered by a different event, in the same BroadcastReceiver. Works wonderfully for me.

I believe this is indeed not possible today. One option for you would be to start up your control extension from a notification list item. So from where you read your notification you can enable a menu and then in that option start up your control. Have a look at the SMS app to get an idea.

Not possible and no workaround available. We have to wait for Sony to fix this issue though they haven't mentioned when they will address it.

We have posted a blog on Sony Developer World regarding this topic:
http://developer.sonymobile.com/2013/12/26/using-both-the-control-notification-apis-for-customised-uis-in-your-smartwatch-2-extension-code/

Related

How to Show Notifications when get close to Beacon even if the app is closed?

I have created a mini App that helps me playing with beacons.
-what i have done so far-
So until now, I have successfully connected my App to the beacon, made 2 texts, so when I'm in the app and get in the beacon's range, the texts are changing so I can see that, move 2m away or turning the beacon upside down so it simulates Out of range, and it will show the message that I'm not in the range anymore.
So far so good, I have also successfully made the app to show notifications when I get close to the beacon, and when I click the notification to open a second activity.
-the problem-
Now, I want to show a notification when I get in the beacon's range, and the app is closed (not in the background). And after, when I click on that Notification to open my app / open App Google Play's Page if not installed.
I have searched on the internet but I haven't found anything conclusive.
If you guys know anything, or have you accomplished this task, it would be great if you can help with it.
If you need more info like, my activities code I can upload it, but I considered unimportant.
Thanks!
Two points:
In order to make a phone react to a beacon without your app installed (e.g. to launch a PlayStore page) you need an app prei-nstalled on all phones that does this for you. The Google Play Services app used to do this through the Nearby feature, but it was discontinued in Nov. 2018 because of spam concerns. Since then this is no longer possible to do.
If you do have your app installed it is a straightforward process to detect in the background and send notifications. The Android Beacon Library provides instructions here:. https://altbeacon.github.io/android-beacon-library/notifications.html
You could create a BoradcastReceiver that intercept the android.intent.action.BOOT_COMPLETED.
In that way, you can launch a part of your app when you turn on the device.
There, you can use a Service or something that can manage the interactions with Beacons.
(BTW, i never worked with Beacons, i don't know what are the policies that you must follow).
If you don't need to launch the app when the device is turned on, anyway you can use a simple Service
Here the link to the documentation of receivers documentation.

Disable notifications in Android

I have a live streaming app where you can be recording for hours and when the user receives a text message or a phone call, the vibration is trnaslated into sound and rippling video on the streaming.
Is it possible to somehow programmatically disable all notifications or do I have to ask the user to do so by himself?
You cannot control notifications from other apps. There is indeed a solution for rooted devices.
'Standards' part in this guide says:
One of the unfortunate problems Android users face is that there is no
centralized control for how notifications work. This means that if
there is an application prompting you with a notification, short of
uninstalling the application, there isn’t much you can do. Starting in
Android 4.1, users received a buried binary setting to 'Turn off
notifications’ for a specific app.
No, unfortunately not. Perhaps on rooted devices, but ¯_(ツ)_/¯. Best way seems to navigate the user to the related setting to disable all notifications, as you have also mentioned.

Is it common practice to ask users whether they wish to receive push notifications?

I'm new to the Android platform. Apple requires every iOS app to ask for and confirm push notifications, but I have not noticed any apps that I've downloaded on my new Android phone prompting me if I want to receive push notifications. It just automatically registers me for them. Is this normal Android convention, to automatically register users for push notifications, assuming they can disable them later?
In my own Android application, should I be prompting users and asking if they want them before I register them? Obviously it would be the polite thing to do to ask permission before signing them up for push notifications, but if that's not common practice I see no reason to potentially lose some receivers of them.
Making decisions for the user is actually a strong Android guideline. Here is a list of the "Android Design Principles", written by Google. As you can see "Decide for me, but let me have the final say" fits the behavior that you've mentioned.
Some things to keep in mind when discussing Android notifications:
Users can disable your app's notifications in their OS settings. If they really don't want to hear from your app, they'll disable notification's there.
User context. You don't know what context the user is installing your app in. Users who are on a crowded train, relaxing on their day off, hanging out at a friend's place, or maybe waiting for a flight, all want different things out of your app at the time of installation. The guy on a crowded train is going to want your app to work immediately, with very minimal setup, while the guy relaxing at home may not mind a long setup process.
Your setup process can have a significant impact on your user retention. This Forbes article briefly discusses intrusive setup forums and their impact on app uninstalls.
At the end of the day however, it all depends on the needs of your audience. If you're targeting professionals, then they might be willing to put in some extra time up-front if they believe your app could help make their job easier. If you're targeting a casual gamer, you'll want them to get in and rolling as fast as possible. It's up to you to decide how best to serve your audience.
Here's a video from Google I/O 2013 that discusses the Android Design Principals in greater detail.
Hope I was able to provide some insight.
Sadly, it does not appear to be a very common practice. I've installed several Android applications that will randomly give me a notification in the middle of the night. I've recently made a new habit of disabling notifications for every new app that I install unless I really want notifications from it. I think your application would result in a much better user experience if you prompted them for notifications. You could also offer configurations for which notifications they wish to receive. If other apps were like this I might choose to receive some notifications instead of globally turning them off.

android react to new notifications

is it possible to react to a notification that did not come from my own program? I need some kind of receiver that reacts when i.e. k9 creates a notification or whatsapp or whatever. I don't necessarily need to read the contents of the notification. So far I've come across nothing on my search, maybe you can help. If I need root for the solution, I'd accept that if necessary.
thanks,
Catscrash
I know this has been sitting for a little bit, but I came across it in my searching, and I figured I would share what I found.
There is a way to do this, and rooting/modding is not required. I do not know what API level you are targeting, but you should look into Accessibility. It is geared towards assisting those with disabilities, but with the user's permission, it grants other apps access to things such as notifications. You can filter by the source package, get the contents, and so much more.
Here is a link to a page on Accessibility Services: http://developer.android.com/guide/topics/ui/accessibility/services.html
This is what I used to run a quick test to prove to myself that it did work. Make a quick project with this, create some notifications, and watch LogCat. This logs much more than just the notifications from the status bar, as you'll see: https://gist.github.com/qihnus/1909616

Is it possible to disable Android firmware update notifications?

The bounty expires in 5 days. Answers to this question are eligible for a +500 reputation bounty.
Alex is looking for a more detailed answer to this question:
Trying to find out that is the Google URL that needs to be blocked in Pi-hole to make the update notification go away.
We have 2 candidate URLs so far.
I have an application running on phones that aren't meant to be touched or interacted with in any way. I want my application to run correctly 24/7/365.
The only issue I'm having is that every few weeks or so, a notification pops up about updating the firmware on the device. It doesn't immediately interrupt the app running but after a few days of no one accepting/declining the firmware download, the app crashes.
Is there any way (either programatically or by changing phone settings) to disable these firmware update popups, or to disable automated firmware updating in general?
Thank you very much!!
3 easy steps:
1. Install free System Tuner
2. Go to Startups
3. Select Google Services Framework
4. Uncheck SystemUpdateInstallDialog and SystemUpdateInstallDownloadDialog
IMPORTANT: You need a rooted device to run this app!
Simple and easy way to stop the system update notification...
Source: http://forums.androidcentral.com/google-nexus-7-tablet-2012/234006-how-do-i-remove-system-update-notification.html
To avoid confusion with the original question I'll repeat the Bounty-Question by Alex first:
Does anyone know what is the URL of google that we can block in Pi-Hole to make the notification go away?
All HTTP-based messages -- including push notifications -- via Google's Firebase Cloud Messaging (FCM) backend go through the server-side endpoint https://fcm.googleapis.com/fcm/send, as described in the reference on the Firebase Cloud Messaging HTTP protocol. The client-side endpoint doesn't seem to be publicly documented, however one can suppose that blocking https://fcm.googleapis.com should do the job.
Analogously all XMPP-based messages go through the endpoint fcm-xmpp.googleapis.com, as documented in the reference on the Firebase Cloud Messaging XMPP protocol.
Yes, it is possible
Settings
Goto "settings"
find the "about phone" or "system" entry in settings
look ofr the "software update" or "system update" option
There should be a 3dotted menu with "settings", or a direct link to Download and install updates automatically.
turn it off.
3rd party
You may also consider (this is what I personally do) installing 3rd party software like NetGuard (for example) and disable internet connection to the system process that checks for updates. If there is no internet connection for the software/app it will not badger you with notifications.
Turn off notifications
Got to the settings of the app responsible for updates. And turn off all permissions related to notifications.
You won't be badgered with the notifications.
on android in the notification bar you can press the notification long time. than an info button should appear. when you click this button you get the system app, which creates the notification. then in the settings of this app you can block every notification. just block all. maybe you will miss other important notifications, i don't know.

Categories

Resources