How to test whether android phone vibrates on alarm notification using java(not using system logs) - android-vibration

I want to write the code in java to validate whether android phone vibrate or not on alarm notification.
I cant found any solution online which test vibration on phones, most solution points on how to vibrate the phone.

Related

iOS: open the app (foreground, background, closed) when a notification is received

I'm a manufacturer of intrusion alarm systems. Now I'd like to send an alarm (a very critical event) to the mobile phone of the user. However it's not acceptable to have a "standard" notification in the tray bar, because the user could ignore it at first. Or another notification could stop my notification.
I'd like to mimic the behaviour of the phone when an incoming call arrives: custom ringtone starts playing for many seconds, the display backlight activates, the vibration starts and so on. Only when the user taps something the ringtone should stop (or after many seconds or minutes).
I think the best method to send messages to a mobile device is through push notifications. However I don't know if the push notification could wake my app, even if it is in background or stopped.
It seems only apps targeting VoIP application can behave in this way. However my app isn't a real VoIP app, so there's a possibility Apple will not accept it.

How do silent notification behave once phone got Power off & On

I have a application which tries to grab location of user using silent notification at certain situations. I am able to send silent notification to the phones and able to run the background fetch and get the location back to web-service.
Comparing the user payload of silent notification I am doing some operation(Initiating the location manager & grabbing location from delegate method) while app is in background/suspended mode. This works in all other cases expect one case which is iPhone Power off & turn back ON case.
Problem: According to my observations, Once after phone got power off & turned back ON, The silent notification is being received by iPhones(I confirm this because I hear the sound because I gave sound in payload) but the operation is not happening.
Do any one have better understanding how iPhone behaves once after turned-on. will it do the operation after receiving the silent notification ?
Does code run anything after phone receiving the silent notification ?
I also tried to save the value in UserDefaults before phone getting power off and the value becomes nil after we turned on the power.
Your help, greatly appreciated..!

Bypass Silent Switch with Local Notification

I'm building an alarm app and my only issue is having the alerts bypass the mute button. Now I did my research and didn't find anything useful a lot of people say it's not possible but I know it is. A lot of alarm clock apps and even Apple's stock clock app have this feature. I'm using iOS's local notifications to push the alert to the user. When the phone is not on silent it works fine. But when the phone is on silent I get the alert and a vibration but no sound. I would like the alert sound to play even when the phone is on mute because say someone creates an alert for the morning and they want to mute their phone so they don't get alerts from other applications waking them up in the middle of the night.
If you have any suggestions please let me know I haven't found anything useful, hopefully someone can put me in the right direction. Thanks in advance!

Locked iOS device scanning for BTLE devices

Can an iOS device scan for presence of Bluetooth LE devices while locked and then respond to them by opening the app?
The scanning can definitely happen in the background.
In order to get the functionality that you're talking about the comment by owen is correct. I'll expand on it a bit.
What we do is when we recognize a BLE device that we're interested in and would like the app to open we send information to our server, from where we have the option to send a push notification if the user wants. This could probably also be achieved with a local notification set a few moments in the future. From there the standard rules apply for push notifications, if they opt to look at it your app can be opened and you can respond to the proximity of the BLE device that initially triggered. The user always has the option to ignore the notification though.

waking up ios applications without using ios notification

Is it possible to wake up a background application with a non ios notification center? e.g. if I were creating a calling or messaging application is it possible to wake the application via SMS.
Nope. If you want to call app outside the device, you should use APNS. On the device you can use local notification. Sending SMS to wake up app is kinda wrong. People don't like such solutions - imagine bunch of SMS every day for different apps. Sorry.
No.
If you have background code running, you can schedule a local notification to yourself. If the user clicks "Ok" then you will come to the foreground. See here for a description and sample code.
As far as I can tell, the only ways to launch an app without user input is via a custom URL handler or via an accessory. It doesn't sound like an accessory fits your use case. Sadly you can't open URLs from the background, so you can't use this to wake yourself.

Resources