Skip to content

Instantly share code, notes, and snippets.

View alvince's full-sized avatar

Pi-ka-pi alvince

View GitHub Profile
@alvince
alvince / HostViewHelper.java
Created July 27, 2018 07:59
Detect game app engine environment
public class HostViewHelper {
/**
* Detect game host activity environment
*/
public static void detectHostEnvironment(@NonNull Activity activity) {
ViewGroup windowContentView = (ViewGroup) ViewUtils.findWindowContent(activity);
if (windowContentView == null) {
return;
}