Skip to content

Commit

Permalink
修改默认ID
Browse files Browse the repository at this point in the history
  • Loading branch information
kidloserme committed Apr 23, 2016
1 parent 1688235 commit e7a8398
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,7 @@ public void onClick(View v) {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
String ip = sharedPreferences.getString(Config.SERVER_IP, Config.DEFAULT_SERVER_IP);
String port = sharedPreferences.getString(Config.SERVER_PORT, Config.DEFAULT_SERVER_PORT);
String id = sharedPreferences.getString(Config.STREAM_ID, "");
if (TextUtils.isEmpty(id)) {
id = String.valueOf(System.nanoTime());
SharedPreferences sharedPreferences1 = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
sharedPreferences.edit().putString(Config.STREAM_ID, id).commit();
}
String id = sharedPreferences.getString(Config.STREAM_ID, Config.DEFAULT_STREAM_ID);
mMediaStream.startStream(ip, port, id);
btnSwitch.setText("停止");

Expand Down

0 comments on commit e7a8398

Please sign in to comment.