Giter Club home page Giter Club logo

Comments (4)

ahmedwahba avatar ahmedwahba commented on August 27, 2024 4

@bkrajendra thanks for great effort , changes will be added next update

from cordova-plugin-drawoverapps.

bkrajendra avatar bkrajendra commented on August 27, 2024 1

Ive resolved this issue temperorily by replacing line number 127, 135, 246 and 242
in file OverAppsService.java:
WindowManager.LayoutParams.TYPE_PHONE
by
WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY
A proper solution can be as follows.

I suggest @ahmedwahba to look into this issue and do the necessary changes in OverAppsService.java.
This is working for me as Im on Android Q and compiling with min-sdk=19 and compile sdk 28+

But more proper way we need to check android build version before using.
I suggest its better to keep it as:

if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
	params_key_dispature = new WindowManager.LayoutParams(
			 WindowManager.LayoutParams.WRAP_CONTENT,
			 WindowManager.LayoutParams.WRAP_CONTENT,
			 WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY,
			 WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
			 PixelFormat.TRANSLUCENT);

	params_key_dispature.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;

} else {
    params_key_dispature = new WindowManager.LayoutParams(
                WindowManager.LayoutParams.WRAP_CONTENT,
                WindowManager.LayoutParams.WRAP_CONTENT,
                WindowManager.LayoutParams.TYPE_PHONE,
                WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
                PixelFormat.TRANSLUCENT);

	params_key_dispature.type = WindowManager.LayoutParams.TYPE_PHONE;
}

Ive not tested this but should work.

from cordova-plugin-drawoverapps.

acedigibits avatar acedigibits commented on August 27, 2024 1

kindly release this update plz

from cordova-plugin-drawoverapps.

bkrajendra avatar bkrajendra commented on August 27, 2024

Oh thank you @ahmedwahba .. I was going to this. And you done it for me.
By the way I have resolved this issue also.
Your OverAppsService.java code need to change a little bit to make it working on new sdk as LayoutParams.TYPE_PHONE is deprecated.

I'll post more about this with details.
Now plugin is working as expected for me, except few thing which I am understanding and will suggest you too.

from cordova-plugin-drawoverapps.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.