Browse files

Return to the controller activity from the status bar icon.

  • Loading branch information...
1 parent 736f372 commit 2dd9a451bb0d83f59fe21abdfb1127d7ac60331a @jasta committed Dec 11, 2011
Showing with 4 additions and 4 deletions.
  1. +2 −1 AndroidManifest.xml
  2. +2 −3 src/org/devtcg/rojocam/UserAlertHelper.java
View
3 AndroidManifest.xml
@@ -35,7 +35,8 @@
<!-- Temporary control/debug console. -->
<activity
android:name="ControllerActivity"
- android:label="@string/controller_title">
+ android:label="@string/controller_title"
+ android:launchMode="singleTop">
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.MAIN" />
View
5 src/org/devtcg/rojocam/UserAlertHelper.java
@@ -74,8 +74,7 @@ public void changeState(CamcorderNodeService.State state) {
private void setNotification(CamcorderNodeService.State state) {
boolean isStreaming = state == CamcorderNodeService.State.STREAMING;
- Intent intent = new Intent(CamcorderNodeService.ACTION_DEACTIVATE_CAMERA_NODE, null,
- getContext(), CamcorderNodeService.class);
+ Intent intent = new Intent(getContext(), ControllerActivity.class);
int notifTitle;
int notifText;
@@ -95,7 +94,7 @@ private void setNotification(CamcorderNodeService.State state) {
notif.flags = Notification.FLAG_ONGOING_EVENT | Notification.FLAG_NO_CLEAR;
notif.setLatestEventInfo(getContext(), getContext().getString(notifTitle),
getContext().getString(notifText),
- PendingIntent.getService(getContext(), 0, intent, 0));
+ PendingIntent.getActivity(getContext(), 0, intent, 0));
mNotifMgr.notify(NOTIF_ID, notif);
}

0 comments on commit 2dd9a45

Please sign in to comment.