cordova

I'm unable to get Device token in an ionic app as a result of Cannot read property 'onTokenRefresh' of undefined

徘徊边缘 提交于 2021-01-07 02:45:25
问题 I followed two tutorials that suggested installed the following: ionic cordova plugin add cordova-plugin-fcm-with-dependecy-updated npm install @ionic-native/fcm I kept getting errors after installing to a device that said the fcm plugin isn't installed so I viewed https://www.npmjs.com/package/cordova-plugin-fcm-with-dependecy-updated#fcmontokenrefresh site that suggested uninstalling npm uninstall @ionic-native/fcm # Ionic support is included and conflicts with @ionic-native's

How would I update my ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables on a MAC to build Android

夙愿已清 提交于 2021-01-07 02:19:54
问题 I'm building an Ionic Cordova cross platform app. When i run ionic cordova build android I get the following error. cordova-android-support-gradle-release: Android platform: V7+ cordova-plugin-androidx-adapter: Processed 65 source files in 1452ms Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=undefined (recommended setting) ANDROID_HOME=/Users/anonymous/Library/Android/sdk (DEPRECATED) Requirements check failed for JDK 8 ('1.8.*')! Detected version: 15.0.1 Check your ANDROID_SDK

CordovaError: Failed to find 'JAVA_HOME' environment variable. Try setting it manually

拥有回忆 提交于 2021-01-07 01:13:10
问题 I get a ionic project from a person, and I want to debug it in a real android device. I use this command: ionic cordova run android --device --verbose And in the end I get these error messages: Preparing Firebase on Android No scripts found for hook "before_compile". Failed to find 'JAVA_HOME' environment variable. Try setting it manually. CordovaError: Failed to find 'JAVA_HOME' environment variable. Try setting it manually. I have JAVA_HOME set, indeed if I do echo $JAVA_HOME I get: /usr

CordovaError: Failed to find 'JAVA_HOME' environment variable. Try setting it manually

你。 提交于 2021-01-07 01:03:05
问题 I get a ionic project from a person, and I want to debug it in a real android device. I use this command: ionic cordova run android --device --verbose And in the end I get these error messages: Preparing Firebase on Android No scripts found for hook "before_compile". Failed to find 'JAVA_HOME' environment variable. Try setting it manually. CordovaError: Failed to find 'JAVA_HOME' environment variable. Try setting it manually. I have JAVA_HOME set, indeed if I do echo $JAVA_HOME I get: /usr

CordovaError: Failed to find 'JAVA_HOME' environment variable. Try setting it manually

人走茶凉 提交于 2021-01-07 01:02:42
问题 I get a ionic project from a person, and I want to debug it in a real android device. I use this command: ionic cordova run android --device --verbose And in the end I get these error messages: Preparing Firebase on Android No scripts found for hook "before_compile". Failed to find 'JAVA_HOME' environment variable. Try setting it manually. CordovaError: Failed to find 'JAVA_HOME' environment variable. Try setting it manually. I have JAVA_HOME set, indeed if I do echo $JAVA_HOME I get: /usr

Ionic build failed “unexpected element <provider> found in <manifest>”

纵饮孤独 提交于 2021-01-03 05:39:57
问题 I have this code <provider android:name="android.support.v4.content.FileProvider" android:authorities="nl.x-services.plugins.videocaptureplus.provider" android:exported="false" android:grantUriPermissions="true" > <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths" /> </provider> But if i try "Ionic cordova run android" i have this error https://pastebin.com/BAtL0VqK What can I do with this error? 回答1: The issue seems to be with

Cordova - download image from URL to the pictures gallery

你。 提交于 2021-01-01 06:33:13
问题 I created a simple cordova android app and I am trying to download an image from an URL to the pictures gallery, but I really can't figure out what is going wrong. I have already searched a lot here in stackoverflow, including the following links: Phonegap - Save image from url into device photo gallery How to save an Image object into a file in Android with Phonegap? I have installed cordova File Transfer plugin and tried to do the example from the official site, but it didn't work too:

Cordova - download image from URL to the pictures gallery

偶尔善良 提交于 2021-01-01 06:31:31
问题 I created a simple cordova android app and I am trying to download an image from an URL to the pictures gallery, but I really can't figure out what is going wrong. I have already searched a lot here in stackoverflow, including the following links: Phonegap - Save image from url into device photo gallery How to save an Image object into a file in Android with Phonegap? I have installed cordova File Transfer plugin and tried to do the example from the official site, but it didn't work too:

Facebook Messenger opens built-in browser instead of deep linked app

不打扰是莪最后的温柔 提交于 2021-01-01 06:12:35
问题 I have a Cordova app that uses the plugin cordova-universal-links-plugin. The deep linking works on other social applications but not with Facebook Messenger. Instead, it opens the built-in browser and redirects it to the link. Here's my config.xml <universal-links> <host name="myapp.com"> <path event="openItemPage" url="/item" /> </host> </universal-links> And in my Cordova app: document.addEventListener('deviceready', onDeviceReady, false); function onDeviceReady () { universalLinks

Facebook Messenger opens built-in browser instead of deep linked app

旧巷老猫 提交于 2021-01-01 06:11:46
问题 I have a Cordova app that uses the plugin cordova-universal-links-plugin. The deep linking works on other social applications but not with Facebook Messenger. Instead, it opens the built-in browser and redirects it to the link. Here's my config.xml <universal-links> <host name="myapp.com"> <path event="openItemPage" url="/item" /> </host> </universal-links> And in my Cordova app: document.addEventListener('deviceready', onDeviceReady, false); function onDeviceReady () { universalLinks