Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A universal cross-platform way (mobile) to show alerts to a user

I have a task to create a client application which can show notifications to a user with a high probability of notifications being noticed.

The application should work on Android (2.0+)/iOS/WP.

Here is the use case:

  1. The user starts the Application and performs some Action. Then he switches to the home screen/another application.
  2. The response to the Action makes the Application to issue a notification. The notification is noticed by the user disregarding of what another application (or home screen) he uses on his mobile device at the moment.

There is no requirement for the application to be a native app or to be a web browser-based mobile app. The notification could be a sound or a vibration on the device, but I know that accessing the vibrations from within a browser is still tricky.

Here are my research results of making universal sound/vibro notification mechanism so far:

  • it seems that making a mobile device vibrate from a browser works only in mobile Firefox (no iOS, no WP);
  • the support of the audio html5 tag is still experimental, it doesn't work on each and every browser/device;
  • the sound alert from this example works only in mobile Firefox (asks for a plugin to play an mp3 sound), the Android browser just remains silent.

So, the question is:

Is there any way to force a user of a mobile device (Android 2.0+/iOS/WP) to view a notification from a mobile application? Is the only way to do this is to write a native app for each mobile platform?

like image 588
skanatek Avatar asked Nov 07 '12 12:11

skanatek


1 Answers

I would propose PhoneGap for that particular problem.

Among other things it features cross-platform alert, sound and vibrator notifications.

Only quirk for Windows Phone 7 is that the Cordova lib includes a generic beep file that is used. You should consult the Notification reference page to make sure if it can help you.

like image 164
Octavian A. Damiean Avatar answered Oct 15 '22 02:10

Octavian A. Damiean