You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.lang.IllegalArgumentException: View=android.widget.FrameLayout{e3fb200 V.E...C.. ......I. 0,0-210,210} not attached to window manager at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:473) at android.view.WindowManagerGlobal.updateViewLayout(WindowManagerGlobal.java:368) at android.view.WindowManagerImpl.updateViewLayout(WindowManagerImpl.java:99) at com.premnirmal.Magnet.Magnet$WindowManagerPerformer.onSpringUpdate(Magnet.java:666) at com.facebook.rebound.Spring.advance(Spring.java:441) at com.facebook.rebound.BaseSpringSystem.advance(BaseSpringSystem.java:129) at com.facebook.rebound.BaseSpringSystem.loop(BaseSpringSystem.java:143) at com.facebook.rebound.AndroidSpringLooperFactory$ChoreographerAndroidSpringLooper$1.doFrame(AndroidSpringLooperFactory.java:118) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:869) at android.view.Choreographer.doCallbacks(Choreographer.java:683) at android.view.Choreographer.doFrame(Choreographer.java:616) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:857) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6123) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)
below is the function to start a Magnet
`public void startMagnet() {
try {
View mFloatingView = LayoutInflater.from(this).inflate(R.layout.layout_floating_widget, null);
below is the function to check permission IN SERVICE
`@RequiresApi(api = Build.VERSION_CODES.M)
boolean checkAndLaunch() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (Settings.canDrawOverlays(this)) {
return true;
}
}
/* final Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
Uri.parse("package:" + getPackageName()));
startActivityForResult(intent, REQUEST_CODE);*/
return false;
}`
this function is in MainActivity so user will be showing permission window
` @RequiresApi(api = Build.VERSION_CODES.M)
void checkAndLaunch() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (!Settings.canDrawOverlays(this)) {
final Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
Uri.parse("package:" + getPackageName()));
startActivityForResult(intent, REQUEST_CODE);
}
}}`
The text was updated successfully, but these errors were encountered:
crash in VERSION 7 and WORKING IN 8 OREO
below is the function to start a Magnet
`public void startMagnet() {
try {
View mFloatingView = LayoutInflater.from(this).inflate(R.layout.layout_floating_widget, null);
below is the function to check permission IN SERVICE
`@RequiresApi(api = Build.VERSION_CODES.M)
boolean checkAndLaunch() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (Settings.canDrawOverlays(this)) {
return true;
this function is in MainActivity so user will be showing permission window
` @RequiresApi(api = Build.VERSION_CODES.M)
void checkAndLaunch() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (!Settings.canDrawOverlays(this)) {
final Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
Uri.parse("package:" + getPackageName()));
startActivityForResult(intent, REQUEST_CODE);
}
The text was updated successfully, but these errors were encountered: