// this code will force the main activity to take focus as background for the chat window//resolved issue- when a browser link is clicked browser does not take focus and// launches in the background of main activityPackageManagerpackageManager=mContext.getPackageManager();Intentintent=packageManager.getLaunchIntentForPackage(mContext.getPackageName());if(intent!=null){intent.setPackage(null);intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);mContext.startActivity(intent);}
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.