nativescript-community / insomnia Goto Github PK
View Code? Open in Web Editor NEW:sleepy: NativeScript plugin to keep the device awake (not dim the screen, lock, etc)
:sleepy: NativeScript plugin to keep the device awake (not dim the screen, lock, etc)
Hi!
I'm trying to use this plugin within a nativescript-vue project but I aways get this error when keepAwake is called:
TypeError: Cannot read property 'getWindow' of undefined'
Actually, I'm trying to run on android platform. Nativescript version is 4.1.
Thanks!
Hey Eddy, looks like webpack support was added to package.json by removing .js but doesnt look like this was released to NPM.
I know why you added the code to check for foreground activity to keepawake or sleep when the app is not active but for me this defeats the whole purpose of the plugin. Can we either revert back to the older version or add a flag to disable this activity check?
In Android there is the PowerManager class (https://developer.android.com/reference/android/os/PowerManager). The class allows for enabling and disabling the wakelock (requires permission). Wouldn't this be a better approach than the foreground service?
Was there any other intention or concern, not to use PowerManager?
Thx!
I am working on Nativescript 6 + Javascript application and I have used insomnia in my code but my application is getting crash due to 'insomnia'.
Here is further error when my application is crash due to insomnia
And my IOS version is 13.1.
2019-11-28 01:03:20.954926+0530 salesrepmobile[19942:14434690] *** Assertion failure in
- [FBSSerialQueue assertOnQueue],
/BuildRoot/Library/Caches/com.apple.xbs/Sources/FrontBoardServices_Sim/FrontBoard-
619.2/FrontBoardServices/FBSSerialQueue.m:98
(lldb)
Please help me. I am really stuck on this.
Hi,
If user is looking on a modal without touching the phone,
the phone is dimming and go to sleep..
I tried to add "keepAwake" when opening modal but no help..
Any suggestions?
Thanks
Hey, you can delete this one. Problem was solved.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.