Create an (repetitive high pitch) Alarm on a remote trigger when App is not running (iphone/android) just like Find My iPhone

前端 未结 3 1707
萌比男神i
萌比男神i 2020-12-18 20:03

I would like to cause an alarm on a remote iphone/android device when the app is running or not running.

How do I achieve it ?

I can only think of Whatsapp/S

3条回答
  •  死守一世寂寞
    2020-12-18 20:32

    For iOS, you will need a server to deliver a push notification to your app, where the notification references a custom audio alert to be played. The audio alert has to be included within the app's bundle as stated in Apple docs.

    This alert can't be longer than 30 seconds. If you want the alert to be played longer, you can send send another push notification times roughly 30-seconds after and stop sending the alert when a) user open the app or b) you've reached the maximum threshold.

    It's generally not good practise to send multiple notification containing the same payload, unless there is a good reason.

    I would suggest splitting up this question into two: one for iOS, and another for Android.

提交回复
热议问题