google / hover

A floating menu library for Android.
Apache License 2.0
2.64k stars 284 forks source link

Expo.io && Hover #93

Closed troyam closed 5 years ago

troyam commented 5 years ago

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);

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!!!

fukemy commented 1 year ago

hi, did u found any solution, i want to send my react native component screen into Hover but I can not find anyway to do it, please help