Skip to content

Commit

Permalink
Reminder about "Watch Now" feature behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
arantius committed Sep 10, 2011
1 parent 5b0c801 commit cd3d960
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
v9 Sep 10, 2011:

* Address a handful of crashes.
* Reminder about "Watch Now" feature behavior.

v8 Aug 31, 2011:

Expand Down
1 change: 1 addition & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<string name="error_multicast">Device search failed. (Read below and) Try custom settings.</string>
<string name="error_net_control">You need to enable network control and/or video sharing to connect to this TiVo. (See below.)</string>
<string name="premiere_only">This app only works with a TiVo Premiere device; not Series 2, Series 3 or HD.</string>
<string name="stream_warning">This button starts playback on your TV. It does not stream video to your device. (This reminder is only shown once.)</string>
</resources>
16 changes: 16 additions & 0 deletions src/com/arantius/tivocommander/Explore.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@
import android.app.AlertDialog.Builder;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.graphics.Color;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.ForegroundColorSpan;
Expand Down Expand Up @@ -174,6 +177,19 @@ public void doUpcoming(View v) {
}

public void doWatch(View v) {
final SharedPreferences prefs =
PreferenceManager.getDefaultSharedPreferences(getBaseContext());
if (!prefs.getBoolean("seen_stream_warning", false)) {
new AlertDialog.Builder(this).setTitle("No Streaming")
.setMessage(getResources().getString(R.string.stream_warning))
.setPositiveButton("I Get It", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
Editor editor = prefs.edit();
editor.putBoolean("seen_stream_warning", true);
editor.commit();
}
}).create().show();
}
MindRpc.addRequest(new UiNavigate(mRecordingId), null);
}

Expand Down

0 comments on commit cd3d960

Please sign in to comment.