Sub Label1_Click
Try
Dim jo As JavaObject
jo.InitializeContext
jo.RunMethod("pip_activity", Null)
Catch
Log(LastException)
End Try
End Sub
#If JAVA
import android.os.Build.VERSION;
import android.view.View;
import android.widget.Toast;
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) {
try {
if (isInPictureInPictureMode) {
Toast.makeText(this, "in picture in picture mode.", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "out of picture in picture mode.", Toast.LENGTH_SHORT).show();
}
} catch (IllegalStateException e) {
e.printStackTrace();
}
}
public void pip_activity(){
try {
if (VERSION.SDK_INT >= 26) {
this.enterPictureInPictureMode();
}
} catch (IllegalStateException e) {
e.printStackTrace();
}
return;
}
#end if