android - Launching webview class from status bar notification -
When I click on my status bar notification it loads my webview, but it reloads it every time Is there any way to load the saved state? Thanks, what do I have here:
Public Zero Start on @Orride (Intent Intent, Intended) {String Ns = Reference. NOTIFICATION_ SERVICE; Notification Manager Manager Information Manager = (Notification Manager) getSystemService (ns); Int icon = R.drawable.notification_icon; Charasata ticker text = "now playing ..."; Long time = System.currentTimeMillis (); Notification Notification = New Notification (icon, ticker text, when); Reference references = getApplicationContext (); Chorascience content = "music promotion"; Characteristic contentText = "Playing Now ..."; Influence notification = new intent (this, main menu square); Pending Content ContentIntent = PendingEntert.Get Activity (This, 0, Notification Intent, 0); Notification.setLatestEventInfo (context, contentTitle, contentText, contentIntent); MNotificationManager.notify (HELLO_ID, Notification); }
add the following:
notification addFlags ( Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); This is what tells the document about FLAG_ACTIVITY_REORDER_TO_FRONT : if passed for reference. Initiality (), this flag will bring launch activity to the heap of its work history if it is already running.
Comments
Post a Comment