Does anyone know how to access *Native* Sound Notifications in Flex Mobile, or the devices "audio" state? - apache-flex

Does anyone know of an AIR Native Extension (ANE) that allows you to access the device's notification sound(s)? OR, a method to query if the device is in "silent" or "vibrate" mode?
I've set up Push Notifications, but no sound plays on my (Android) device.
I know I can play my own sounds, but I want to use the native notification sound (the same as an SMS or email alert sound) and I don't want the sound to play if it shouldn't (viz. silent mode / vibrate mode).
I've been looking for hours and there's a "Vibrate ANE," and others looking for the same type of capability, but I haven't found anything usable for native sound notifications.
I believe that iOS automatically will play a notification sound when it receives a push notification (I think), but Android just flashes the "shade title" & shows the app's icon for the notification.
Maybe someone else has stumbled across a solution??? =)
Many Thanks!
Todd =D

I think you might have to be careful attempt to access the built in sounds on iOS.
We definitely could write an extension that played any of the system sounds. However I believe these sounds are copyrighted, and my understanding of the Apple ToS is that your application may get rejected from the AppStore if you use them directly.
This is why things like a notifications extension only use a "default notification" value to access system sounds that are set by the user. These sounds are played on certain system events.
The sounds are all accessed via undocumented IDs: http://iphonedevwiki.net/index.php/AudioServices
So yeah we’ve been very cautious of writing anything that could put developers in trouble with the AppStore. You have enough problems getting apps through as is. But if you read otherwise let me know.

Related

Can Service Workers receive pushes when not installed on mobile?

I think I know the answer to this question from my experiments, but I haven't been able to find a definitive answer when doing research.
Is is possible to send notifications to a PWA when it is opened in Chrome on mobile, but isn't installed?
Once it is installed I can receive notifications, but I can't before.
I'm having a hard time getting remote debugging working for my mobile so it's difficult to tell if the push event is even firing.
The docs, don't specify the need to install the pwa to be able to use the notification feature. However what I suspect is happening in your case is that Chrome is not giving priority to notify to the notification that you are sending without installing. What I mean is that you might receive your notification on the regular wakeup cycle of Chrome, and not as a background task. (But this is just a speculation)
Another common scenario that happens a lot, trust me :-), is that you forgot to give permission to send notifications in the first place.
Regarding remote debugging, refer the docs, to get it setup on Android. As a lot of the online tutorials are a bit out of date.
Note: I found an article online that shows a notification received without installing on Android, here is its link, it might not be very helpful for your case but check it out you might figure something out.
Yes they can.
The problem was that I had notifications enabled for my site, but disabled for Chrome itself.

Architect website/mobile notifications generated by users activities

I am working on a mobile application, this application has some features like users can follow each others, adding comments or reviews, like something .. etc.
So the requirement is we have notifications icon in the app, when the user click on it a list of notification will show up, taken in consider those notifications should be real time.
Many things comes to my mind will reviewing this feature, like using firebase to send the notification, or I can develop internal notification service for this purpose.
The question is what do you suggest guys, do you think using firebase is a good idea for such case? or there is something else you recommend for such case
Thank you in advance.
You can try signalR more manageable than firebase but you need to know programing to manage signalR

Set different sound notification

I have a pool of device tokens (iOS and Android) and in the docs, I find only one parameter sound for both platforms and obviously I have 2 different notification sound, one for Android and one for iOS.
Do I have to split device tokens by device type for sending to 2 separate device types? Or did I just miss something ?
Thanks.
Solution 1
You could name the same both audio files, like 'your_app.mp3'.
Same name, but different music file on each app. This not allow the user choose the notification sound, but at least allow each app to have a different sound.
Solution 2
Migrate to the new Firebase HTTP v1 API which allows you to customize notifications across platforms
Personal experience
Solution proposed by #daniel-raouf to send Data Messages is great; but in my experience, some Data Messages could not be delivered to your users when:
An user has a power save mode on his phone (by default on Huawei, Xiaomi, One Plus...)
When iOS users clear your app from recent apps (multitask).
So, in my opinion, Data Messages are not a reliable solution for notifications.
You had missed something,
A- If you want to allow the user to select his preferred notification sound at any device so
don't send notification
send only data to force the received content to pass by the onReceive event
In on receive add the sound the icon and data you want to the notification builder.
B- If you want the app to use the default sound
so in the notification body set sound:'default' and it would work for all types of devices

Push Notification When App is closed/Quit including

Can anyone please so let me know precisely that how can I accomplish the task in which I need to show Push Notification to user when App is Quit/closed?
Currently, I am able to get the push notification done when App is running in background or opened. But App couldn't receive Notification when it is quit/closed by the user.
Right now, it's a really critical task on my shoulders. It's pretty clear do tell me in case if you guys need me to brief in details.
I am having a very hard time to believe that your scenario is Really the following:
When the app is either: open and in the foreground, or open and in the background, you are able to receive a notification to the device, and have its contents displayed in the app, but
When the app is quit (as in not running), the notification does not arrive to the device at all.
I have tested several devices and several push-enabled applications (event source, tag-based). The notification does arrive to the device, after the user subscribed to either a tag or by logging-in (in the case of event source-based), after which sending a notification always arrived to the device.
I don't understand this sentence:
my app logouts with the user
You need to be CLEAR in your explanation. Is there a logout button that the user clicks? If yes, are you also for some reason perform an unsubscribe API invocation? If no, edit the question and provide DETAILED, step-by-step reproduction instructions, AS WELL as provide your application, or any code that you use so that it could be inspected for possible issues.

Custom message for push registry alert j2me

When I receive a push notification in my j2me application it shows its built-in message at start, what I want to do is to place my own message say "Do You Want to Launch App?" when a notification of invoking application is received! How to change it?
It is unlikely that application developer would be allowed to do stuff like that in the real phone, and here's why.
This functionality is a part of security sensitive features (if you're interested in details, check documentation like The Recommended Security Policy for GSM/UMTS Compliant Devices).
If this would be allowed, malware applications could transform not just wording but the very meaning of a standard system message, thus tricking user into doing something wrong.
For an example, imagine an application doing tracking of user location, or sending paid SMS, or something similarly sensitive to one's privacy or budget, having mentioned message changed to:
Click Yes to win million dollars.
As a phone user, the last thing I would want of my device would be to allow tricks like that.

Resources