local-notification | Local Notification Plugin for Phonegap | Build Tool library
kandi X-RAY | local-notification Summary
kandi X-RAY | local-notification Summary
Tested on PhoneGap 2.6.0, 2.7.0, 2.8.1. Originally forked from
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- install to emulator
- install specified device
- Called with an emulator
- Build the application
- Process a message .
- get emulator images
- Applies code to Android .
- Load plugins .
- Merge an object recursively .
- Format arguments as string .
local-notification Key Features
local-notification Examples and Code Snippets
Community Discussions
Trending Discussions on local-notification
QUESTION
I am having trouble with local notification on Android using Xamarin. The local notification shows every time the app is in the foreground or open. If I reboot the notification does not show. There is a RECEIVE_BOOT_COMPLETED
BroadcastReceiver
but I do not know if it is firing on reboot.
I cannot figure out what is wrong. I have tripled checked everything and feel like something small is missing.
Edit: I think I have it worked out for notifications on the app being closed thanks to this thread: Broadcast receiver not working when app is closed. Essentially, if debugging, the app needs to be reopened after closing it so that the receiver is called.
I used this doc to setup local notifications: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/local-notifications
AndroidManifest.cs
...ANSWER
Answered 2022-Mar-21 at 00:19I hate to delete a question from the internet.
The issue on boot received was using dependency injection in the boot receiver. Exception: You must call Xamarin.Forms.Forms.Init(); prior to using this property.
I just instantiated the class instead of using DI for this instance.
Here is what worked for me on the issue with the notification not showing when the app was closed: https://stackoverflow.com/a/60197247/814891
After registering my BroadcastReceiver (BR) statically in the manifest, applying the proper intent filters, using JobIntentService (and registering it in the manifest) to handle the work that was called from my BR, I was still getting inconsistent results.
Once all of what I listed above has been done you should be able to send an ADB command to activate your broadcast and process the work in your service even if the app is closed. This was working for me some of the time, but not all of the time.
This article describes limitation to BRs. "As of Android 3.1 the Android system excludes all receiver from receiving intents by default if the corresponding application has never been started by the user or if the user explicitly stopped the application via the Android menu" (AKA a user executes Force Stop)
When I start the app by debugging it, then swipe it closed on my device, my ADB command never activates my BR. However, after my debugging session is over, when I open up the app on my device and swipe it closed, I can activate my BR through ADB commands.
This occurs because when you debug an application, then manually swipe it closed on the device, Android considers this a Force Stop hence why my BR cannot be activated until I re-open the app on the device without debugging.
Scoured the internet for hours, and wasn't able to find my solution, so I thought I'd post it here just in case some poor unfortunate soul is encountering the same weird functionality I was.
Happy coding :)
QUESTION
I'm trying to make a Cordova game using Three.js where it could be playable Offline, but it seems Three.js
is very keen on making it mandatory to serve texture files via http
. Is there a way around this? I'm desperately trying to avoid using a Node.js server for my game, if possible
Before you mention it can't be done, there are plenty of games on Google Play/App Store that are 3D and work offline, e.g Temple Run, Match 3D, ect. How do these work?
Since trying to load GLB/GLTF
models, have to use import {GLTF}
method in my index.js
file, which my index.html
file needs index.js
to be declared as a module
, which in turn gets hit with a CORS
I've tried converting my .glb files to .json and using Three.js's built-in ObjectLoader
, but I get an error THREE.ObjectLoader: Can't load resources/models/test.json
index.html
...ANSWER
Answered 2021-Dec-13 at 02:06It is just doing a XHR request via a XMLHttpRequest, so there shouldn't be any issue loading local files, it all depends how you're set. If you are using cordova-android 10, you can try setting in your config.xml
QUESTION
I'm currently having trouble getting my Ionic 5 along with Angular 9 project to work.
ionic cordova run android
works great
but as soon i run ionic cordova run android --prod
the only thing i get is a blank screen.
Output from chrome dev tools:
...ANSWER
Answered 2021-Nov-28 at 13:49I got everything working after following these steps:
- renamed folders node_modules, www and platforms/android (for backup reasons)
- npm install
- ionic cordova prepare android
- ionic cordova run android --prod
QUESTION
I have upgraded the cordova-android version from 9.0 to 10.0.1 and facing the below issues while building the Cordova app using - ionic cordova build android
Errors:
...ANSWER
Answered 2021-Aug-15 at 14:36It finally worked for me. I changed the gradle version used to 6.7.1 and reinstall some outdated cordova plugins.
plugins used:
QUESTION
I am building an IOS and Android application using Flutter. My application needs to run a background task when the application is closed (let's say about every 15 minutes). Then show the notification. I am following this article, https://www.geeksforgeeks.org/background-local-notifications-in-flutter/?fbclid=IwAR0sKCVATW068AxuRIyDO693vcqwU0VTPVl1bgVkM3J3EGCHExv8P13dvz4. So, I am using this library, https://pub.dev/packages/workmanager. It is working for Android, but it is not working for IOS.
This is my code.
...ANSWER
Answered 2021-Nov-10 at 20:38That plug-in only supports one-off tasks on iOS.
The exception message tells you that the method registerPeriodicTask
was unhandled.
Even if it did work on iOS, iOS doesn't support tasks scheduled at specific intervals. You can request background task dispatch but the operating system will make decisions based on things such as battery life, whether the device is awake and even the past performance of your app as to whether to actually execute a background task for your app.
Ideally rather than performing a task every 15 minutes on a mobile device you should devise some other approach; Have a server perform the task and send a notification if required, as an example.
QUESTION
Right after the splash screen fades out, the app is stuck on a blank page leaving this error in the console (ProxyWeb::didFailProvisionalLoadForFrame)
Note that the same app works perfectly on all previous IOS versions. I tried to change the webview plugin version, cordova-ios, and played around with angular build process but no luck.
I suspect that the angular portion of the project does not initialize, cordova itself loads successfully but anything beyond that is just an empty blank screen.
...ANSWER
Answered 2021-Sep-24 at 12:03Problem solved by a colleague, turned out a few providers (DatePipe, Location, Market, InAppBrowser) in app.component.ts
and a router animation were causing the fuss.
QUESTION
I was using FCM plugin earlier. But it stopped working on Android 11. So thought of switching to firebasex plugin. But as soon as I add it to my project. ionic-native/http stops working.
Ionic Info :
...ANSWER
Answered 2021-Sep-07 at 00:18Ionic Native Plugin Firebase X has conflict issues with Ionic Native HTTP because of OKHTTP Version.
There are two possible solutions here. First is by locking the version by adding the following to the config.xml:
QUESTION
We use Angular in a nx monorepo in which we have been using Capacitor 2.4 for half a year now. We only use the android platform as of now. Now, we need to upgrade to Capacitor 3.0. The app itself is running again, however, as soon as I use any Plugin I always get the following exception: ERROR Error: "Device" plugin is not implemented on android
This is the same for every Plugin I have tried to use. So, if I would use the Storage Plugin I would get the same exception only for "Storage". I have followed the Capacitor migration guide (https://capacitorjs.com/docs/v3/updating/3-0) in detail, but I can't figure out where I went wrong. In general, the app works now, as long as I have any code that uses a Capacitor Plugin commented out. The code using the Plugins did work before the upgrade.
As according to the migration guide, I added import '@capacitor/core';
at the main.ts file, although I also tried putting it in the app.module.ts but had no success there either. I have installed every plugin for the whole app (the root) and for the nx-capacitor app (the capacitor app added with @nxtend-capacitor) as suggested here https://nxtend.dev/docs/capacitor/getting-started/. I also have updated the capacitor cli, the capacitor core and the capacitor android version for both package.json files.
Furthermore, according to the android upgrading guide, I have also updated gradle and the android gradle plugin. I have also updated the Android variables accordingly.
I honestly do not have too much experience or in-depth knowledge of Capacitor and I am aware that Capacitor 3 is still in Beta as of this point. However, maybe someone has already stumbled upon this problem and found a solution. I am also not sure, if this problem could somehow be caused by using this monorepo approach with nx. Has someone had experience in upgrading Capacitor to 3.0 while using a Nx monorepo?
For reference, this is the current package.json for the capacitor app:
...ANSWER
Answered 2021-Apr-27 at 08:34Try removing android platform (IMPORTANT: backup your android directory before removing.)
and run:
QUESTION
This may have a very simple answer, as I am pretty new to Swift and SwiftUI and am just starting to learn. I'm trying to schedule local notifications that will repeat daily at a specific time, but only do it if a toggle is selected. So if a variable is true, I want that notification to be scheduled. I looked at some tutorials online such as this one, but they all show this using a button. Instead of a button I want to use a toggle. Is there a certain place within the script that this must be done? What do I need to do differently in order to use a toggle instead of a button?
...ANSWER
Answered 2021-Feb-06 at 05:14You can observe when the toggle is turned on and turned off -- In iOS 14 you can use the .onChange
modifier to do this:
QUESTION
My NS 6.5 Core app works fine on iOS and also builds without issues for Android, but when I try to install it on a device (emulator or physical), I get the following error:
...ANSWER
Answered 2021-Jan-27 at 14:48After some testing it turned out that nativescript-sentry was the culprit. The plugin works great on iOS, not sure what the issue is on Android. I will be following up with the plugin author for more information.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install local-notification
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page