I have a Nexus-S which has no external notification LEDs to show a missed call, text message or email. What are some ways to implement a notifcation application? Write a service? write screen blanking application and draw on the app screen when blanked (what about locking?). I thought I would try turning on the hardware key back-lights as a notification but that proves to need root access so that's out. Please don't link to an app on the market unless it's Open Source. Thanks
What are some ways to implement a notifcation application?
I do not know what a "notification application" is. To notify users (e.g., flash LED where available), use a Notification, with whatever mix of options you want on it (e.g., play a ringtone).
Write a service?
A service can raise a Notification.
write screen blanking application and draw on the app screen when blanked (what about locking?)
Users do not necessarily appreciate activities appearing out of nowhere. If you go this route, give them the option of a classic Notification or your activity.
Related
I have an app that needs to show a full screen notification even when the phone is locked or the app is closed, something like ubber, when the user orders a driver i want the driver to be able to see a fullscreen notification that shows the details of the order and some action buttons that might reject the order, accept it, or open some activity in the app like checking the users profile or something.
I don't want it to be just a normal notification because the whole buisness kinda depends on it, the driver needs to be instantly informed about the order and react to it, that can be best achived with implementing a full screen notification just like answering a call, it's a time-sensitive message.
Is this possible with react native and some push notification service like OneSignal?
After doing some research i found that this may be achievable with Android using services and full screen notification intent, but in ios it's more complicated since background tasks are very restricted in iOS.
So im just looking for some insight on how to achieve this or at least something similar, is it even possible to achieve something like this? Do i have to write some platform specific code for both iOS and Android?
ANY help at all is very much appreciated, thank you.
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.
how to make the telegram's sound notification like an alarm, so that whenever there is a new post in the channel the phone keeps beeping like an alarm.
One possible solution on the iOS would be to forward messages from the channel (that's not mine, but I am a member) to my phone via SMS, as you can set a constant alarm for SMSes on iPhone.
I do not really have any better ideas on how to do this, so I am open to any clues that you can come up with. Maybe some of you know if there is any other way to achieve the same result on ios, android, windows phone or computer.
Thanks
To set a custom notification sound for any app, do as follows:
Settings : General : Apps & Notifications : App info
Now scroll to the app that you want to customise. In this case, select Telegram by pressing it.
Select "App notifications". Now you can select a default notification, but more particularly, you can pick a group or contact from the list.
The default setting for importance is "medium: no sound". Press that and change it to "Urgent" or "High". Go back one screen. Now you can select the sound, by pressing "Sound". Pick a sound, or add a custom sound by pressing "+" at the top right.
If you want to record something, like a voicetag that says "Telegram from Tom", simply move a recording of that into the "music" folder on your phone, select it as above and when a message comes in from Tom, you'll hear the message played.
These steps were taken on Android 8 on an LG G6, but should be similar for other phones. For older versions of Android this feature may not be available. IOS? Sorry, none around here.
You can also do this in the Telegram app: Screenshots below.
The channel members would need to set a specific alarm sound for the channel. There is no way the sender of a message (not even a bot) could modify the sound of a notification.
I'm trying to figure out the right way to add Chromecast buttons (pause, play, etc) to an Android Notification. I've set up a custom notification that sends PendingIntents to a ChromecastService. That service is trying to interact with a class I built called ChromecastAdapter. The ChromecastAdapter implements MediaRouteAdapter and contains all the listeners and state that go along with casting. However, all this state is gone as soon as I exit the application. So, my ChromecastService doesn't end up having access to the Chromecast once my app is gone.
It seems to me that the only way to get this to work is refactor all the Chromecast state into a Service that implements MediaRouteAdapter. I really don't want to do this since I'm pretty happy with the way things are now.
Since these interactive Notifications are required by Google, I feel like there has to be a standard way of interacting with a cast from a Notification. Am I on the right track here? Do I have to place all my Chromecast interactions behind a Service?
What the behavior should be depends on the type of app and the requirements of the app. If your app is "gone" (in the sense that the Application instance is gone), then the question that you should ask yourself is whether you would want to keep a notification mechanism to stay around; there are apps that when they are killed, the receiver also gets closed and user is sent back to the home screen on the chromecast device, in which case there is no reason to keep a notification around.
On the other hand, there are apps that based on their requirements, you would want to let the cast device continue what it was doing (for example play the video) even if the mobile app is gone. In those cases, you may want to have a notification mechanism in place for "bringing up" the app. To achieve that, you need to maintain certain amount of information/state/objects in a service, enough to be able to establish a connection again and "join" the running app. In addition, your "service" needs to be aware of the status of the app on your receiver so if that app is killed (say, someone else starts casting a different app to the device), it can be notified and exit.
I have an android app which needs to keep sending SMS. My problem is that whenever we send a message we get a pop up showing (your SMS charges and your curent talktime balance in phone). When i send many SMS these pop ups keep getting accumulated one over the other which is undesirable for me. I need a way out to either remove or somehow consume these pop ups.
Any ideas ??
a pop up? Do you mean a toast? or notifications accumulating below the status bar?
You'll have to pardon my seemingly simple question. In the US, I've had multiple Android phones on at least two carriers, and I don't get any such message in any form, but may be that's because I've always had unlimited texting so additional texts do not cost me anything.
I bet you're talking about notifications accumulating in the status bar. So if your carrier is doing that, take a look at the code in the "API Demos" > App > Notification > Status Bar
There in the callback attached to the "Clear Notification" button, you'll find the code you're looking for.
And if I could suggest something, I know that many notifications accumulating on top of each other can be super annoying, but if you can try to consolidate all those notifications into one notification at least with the running count (unless your user explicitly opts out from being notified). This way, you still communicate to the user the most important part of the information - how many texts in total his phone has been sending so far, without completely overwhelming him with many-many notifications about basically the same event happening over and over again.
For those who don't know, "API Demos" is a free application you can download from the Market. And there may be several to choose from, so just pick the one with five stars next to it, but "API Demos" is also the same sample code that comes with different SDKs when you download it with the SDK Manager, and you can access that code when you create a new Android Project with the New Android Project... wizard from within Eclipse and then select the radio button "Create Existing Project from Sample" (or something like that, I don't have Eclipse in front of me, so the wording may be slightly incorrect). And of course, if you don't use Eclipse, you can always find that sample code through the Sample code directory itself.
As a potentially more elegant alternative, or may be just in case your carrier is indeed crude enough to pop up an actual modal dialog every time a text is sent, it may be that your carrier is using a broadcast receiver to trigger those notifications or those dialogs, so if that's the case, and hopefully the carrier isn't using "100" as a priority for its receiver, it may be possible for you to register a receiver with "100", and then kill the broadcast before it propagates to the other receivers. But of course, that's assuming that your carrier designed it that way for you.