Skip to content

Commit

Permalink
WearPlayingActivityでしばらく経つと、ウォッチフェイスに戻ってしまう問題を修正
Browse files Browse the repository at this point in the history
WearPlayingActivity内で明示的にAmbientモードに入るようにすることで解決した。
  • Loading branch information
Hayato Kimura committed Mar 4, 2016
1 parent 58fcd4c commit b497fe2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public void onUpdateAmbient() {

@Override
public void onExitAmbient() {
updateDisplay();
super.onExitAmbient();
updateDisplay();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public class WearPlayingActivity extends WearableActivity implements SensorEven
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_playing_wear);//activity_playing_wearを表示
setAmbientEnabled();

/*mContainerView = (BoxInsetLayout) findViewById(R.id.container);
mTextView = (TextView) findViewById(R.id.text);
Expand Down Expand Up @@ -133,6 +134,20 @@ public void onClick(DialogInterface dialog, int which) {
}
}

@Override
public void onEnterAmbient(Bundle ambientDetails) {
super.onEnterAmbient(ambientDetails);
}

@Override
public void onUpdateAmbient() {
super.onUpdateAmbient();
}

@Override
public void onExitAmbient() {
super.onExitAmbient();
}
@Override
protected void onStop(){
super.onStop();
Expand Down

0 comments on commit b497fe2

Please sign in to comment.