Comments (4)
@bkrajendra thanks for great effort , changes will be added next update
from cordova-plugin-drawoverapps.
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.
kindly release this update plz
from cordova-plugin-drawoverapps.
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)
- How to use it with ionic 2 ? HOT 14
- Build failed after adding plugin HOT 8
- Doesn't install with cordova-android 9.0.0 HOT 3
- Draw over other app is not working properly! HOT 3
- Insufficient Overlay width
- Build Failed HOT 2
- Doesn't install with cordova-android 12.0.0
- Error: Cannot read property 'PACKAGE_NAME' of undefined HOT 3
- error: cannot find symbol HOT 4
- error: "package R does not exist" on several lines of OverAppsService.java HOT 12
- deviceready has not fired after 5 seconds. HOT 11
- App crashes when I call window.overApps.startOverApp HOT 9
- adding plugin causes build problem HOT 3
- Cannot read property 'checkPermission' of undefined HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-drawoverapps.