findViewById(R.id.button_launch_menu).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
DemoHoverMenuService.showFloatingMenu(getApplication().getApplicationContext());
}
});
// On Android M and above we need to ask the user for permission to display the Hover
// menu within the "alert window" layer. Use OverlayPermission to check for the permission
// and to request it.
if (!mPermissionsRequested && !OverlayPermission.hasRuntimePermissionToDrawOverlay(this)) {
@SuppressWarnings("NewApi")
Intent myIntent = OverlayPermission.createIntentToRequestOverlayPermission(this);
startActivityForResult(myIntent, REQUEST_CODE_HOVER_PERMISSION);
}
}`
...
When I remove it the app loads fine but if I apply that my app stuck's and the hover works fine.
I'm new with Android Studio and Detached App, can you help me? THANKS!!!
Hello, I'm trying to use a hover with Expo.io and the application stuck before loading the Expo published app.
MainActivity.java
`import io.mattcarroll.hover.overlay.OverlayPermission;
public class MainActivity extends DetachActivity {`
... `private static final int REQUEST_CODE_HOVER_PERMISSION = 1000;
private boolean mPermissionsRequested = false;
protected void onCreate(Bundle expBundle) { super.onCreate(expBundle); setContentView(R.layout.activity_main);
}` ...
When I remove it the app loads fine but if I apply that my app stuck's and the hover works fine. I'm new with Android Studio and Detached App, can you help me? THANKS!!!