How do i alternate between this two intents on a surfaceview and create the sort of graphical effect seen in youtube during start/pause when recording a video?
-->stopService(new Intent(getApplicationContext(), ServiceRecording.c开发者_JAVA百科lass)); -->startService(new Intent(getApplicationContext(), ServiceRecording.class);
public void onClick(View v)
{
}
Is there some reason why the following idea won't work?
if (serviceRunning) {
serviceRunning = false;
stopService(...);
} else {
serviceRunning = true;
startService(...);
}
精彩评论