Mercurial > 510Connectbot
comparison src/com/five_ten_sg/connectbot/service/ConnectionNotifier.java @ 172:cb9e359ea2bd
add switch session command from the monitor
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Tue, 01 Jul 2014 20:07:12 -0700 |
parents | 0ce5cc452d02 |
children |
comparison
equal
deleted
inserted
replaced
171:18aceeae6681 | 172:cb9e359ea2bd |
---|---|
54 Notification notification = newNotification(context); | 54 Notification notification = newNotification(context); |
55 Resources res = context.getResources(); | 55 Resources res = context.getResources(); |
56 String contentText = res.getString( | 56 String contentText = res.getString( |
57 R.string.notification_text, host.getNickname()); | 57 R.string.notification_text, host.getNickname()); |
58 Intent notificationIntent = new Intent(context, ConsoleActivity.class); | 58 Intent notificationIntent = new Intent(context, ConsoleActivity.class); |
59 notificationIntent.setAction("android.intent.action.VIEW"); | 59 notificationIntent.setAction(Intent.ACTION_VIEW); |
60 notificationIntent.setData(host.getUri()); | 60 notificationIntent.setData(host.getUri()); |
61 PendingIntent contentIntent = PendingIntent.getActivity(context, 0, | 61 PendingIntent contentIntent = PendingIntent.getActivity(context, 0, |
62 notificationIntent, 0); | 62 notificationIntent, 0); |
63 notification.setLatestEventInfo(context, res.getString(R.string.app_name), contentText, contentIntent); | 63 notification.setLatestEventInfo(context, res.getString(R.string.app_name), contentText, contentIntent); |
64 notification.flags = Notification.FLAG_AUTO_CANCEL; | 64 notification.flags = Notification.FLAG_AUTO_CANCEL; |