@@ -346,6 +346,11 @@ public class MainActivity extends AppCompatActivity |
||
346 | 346 |
boolean isFromAPP = urlInfo.contains("pai.ai/g/"); |
347 | 347 |
MobclickAgent.onEvent(this, isFromAPP? UmengEvent.home_scan_group_back:UmengEvent.home_scan_session_back); |
348 | 348 |
String groupId = urlInfo.substring(urlInfo.lastIndexOf("/") + 1); |
349 |
+ String lensmanId = ""; |
|
350 |
+ if(!isFromAPP){ |
|
351 |
+ groupId = urlInfo.substring(urlInfo.lastIndexOf("/") + 1,urlInfo.lastIndexOf("?")); |
|
352 |
+ lensmanId = urlInfo.substring(urlInfo.lastIndexOf("=")+1); |
|
353 |
+ } |
|
349 | 354 |
if (requestCode == JOIN_REQUEST_CODE) { |
350 | 355 |
Intent intent = new Intent(this, GroupService.class); |
351 | 356 |
if (!isBound) { |
@@ -358,6 +363,9 @@ public class MainActivity extends AppCompatActivity |
||
358 | 363 |
bundle.putString("group_id", groupId); |
359 | 364 |
bundle.putBoolean("isFromAPP", isFromAPP); |
360 | 365 |
bundle.putString("nickname", Preferences.getInstance(this).getNickName()); |
366 |
+ if(!isFromAPP){ |
|
367 |
+ bundle.putString("lensman_id",lensmanId); |
|
368 |
+ } |
|
361 | 369 |
intent.putExtras(bundle); |
362 | 370 |
startService(intent); |
363 | 371 |
Toast.makeText(this, R.string.group_join_tip, Toast.LENGTH_SHORT).show(); |
@@ -239,6 +239,7 @@ public class GroupService extends Service implements UploadTask.OnPhotoUploadLis |
||
239 | 239 |
params.put("group_id",bundle.getString("group_id")); |
240 | 240 |
}else{ |
241 | 241 |
params.put("session_id",bundle.getString("group_id")); |
242 |
+ params.put("lensman_id",bundle.getString("lensman_id")); |
|
242 | 243 |
} |
243 | 244 |
params.put("nickname",bundle.getString("nickname")); |
244 | 245 |
params.put("user_id", Preferences.getInstance(this).getUserId()); |