Search Results

Search found 7 results on 1 pages for 'araja'.

Page 1/1 | 1 

  • Android - Clicking on notification in status bar binds the intent with the target activity

    - by araja
    I have created an activity which sends a number of notifications to status bar. Each notification contains an intent with a bundle. Here is the code: String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns); int icon = R.drawable.icon; long when = System.currentTimeMillis(); Notification notification = new Notification(icon, "Test Notification", when); Context context = getApplicationContext(); Bundle bundle = new Bundle(); bundle.putString("action", "view"); Intent notificationIntent = new Intent(this, MainActivity.class); notificationIntent.putExtras(bundle); PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, Intent.FLAG_ACTIVITY_NEW_TASK); notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); mNotificationManager.notify(1, notification); When user clicks this notifications, I read the bundle string "action" and performs that action. Here is the code: Bundle bundle = this.getIntent().getExtras(); if(bundle != null) { String action = bundle.getString("action"); performAction(action) } Everything works as expected. But, when I minimize the app using "arrow" button on device and then press and hold home button and clicks on my app icon the application starts and performs the same last action which have been performed by clicking the last notification. I figured out that when we click the app icon the application starts with last intent triggered by the notification. Can anyone help in this?

    Read the article

  • Best XMPP Client PHP/Javascript

    - by araja
    Which one is the best XMPP client library for PHP/javascript? I have gone through many of these like: JSJaC XMPPHP MISSUS Kaazing Gateway Some one having experience in using these will have better idea.

    Read the article

  • Unable to send Url in a Form field

    - by araja
    I am facing a problem while submitting a simple HTML form. Here is the form: <form name="form1" method="post" action="dest.php"> <input type="hidden" name="my_url" value="http://www.livrotek.com/book_image/thumb/12726851341.jpg" /> </form> When I submit this form, I get an apache error: You don't have permission to access dest.php on this server. If I change the value of "my_url" field to any value other than a URL, then it works fine.

    Read the article

1