Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In order to show alert in your background. Create an Activity which runs as a dialog. For example create an activity like this</p> <pre><code>public class AppNotification extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AlertDialog alertDialog = new AlertDialog.Builder(AppNotification.this) .create(); alertDialog.setTitle("Alert"); alertDialog.setMessage("Something"); alertDialog.setButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { finish(); } }); alertDialog.show(); } } </code></pre> <p>Also In manifest file use this</p> <pre><code> &lt;activity android:name=".AppNotification" android:theme="@android:style/Theme.Dialog" &gt; &lt;/activity&gt; </code></pre> <p>And Call this activity when ever you want to show some notifications like this</p> <pre><code>Intent i = new Intent(context, AppNotification.class); context.startActivity(i); </code></pre> <p>In Order to Give Notifications use</p> <pre><code>navigator.notification.alert("hai"); // For foreground window.plugins.BackgroundService.callNotifications('callNotifications', callNotificationsSuccessCallBack, callNotificationsFailCallBack); // For Background </code></pre> <p>Just as you used service plugin to call the service you use the call notifications.And then perform the actions like this</p> <pre><code>else if (CALL_NOTIFICATION_ACTION.equals(action)) { Log.d(TAG, "CALL_NOTIFICATION_ACTION"); Intent i = new Intent(ctx, AppNotification.class); context.startActivity(i); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload