cordova-plugins

Speech Recognition: “Network error” on startListening() Android 6/7

依然范特西╮ 提交于 2019-12-11 04:53:49
问题 When I run the code below, as soon as the beep sounds to start recording the mic, I get "Network error": I have no idea what's wrong here. I've: added the: cordova plugin + npm module correctly, granted permissions in the app for microphone tried connected to WIfi tried connected to 4g tried removing and re-adding the android platform to the project tried on 2 different phones (samsung s5 android 6 / sony xperia z5c android 7) Here's my basic code, nothing special here: setupSpeechRecognition

Ionic: Intercept PDF URLs with cordova-plugin-inappbrowser

北战南征 提交于 2019-12-11 04:45:32
问题 I am building an Android/iOS Application with ionic 3, which simply consists of a webview by cordova-plugin-inappbrowser (version 3.0.0) and a responsive homepage. The homepage holds different links to websites as well as to (online) PDF files. As I've learned, the webview in Android (I haven't tried iOS, yet) does not support opening PDF files. That's why I wanted to intercept the called URLs, and open them in some other way, if they end on '.pdf': import { Component } from '@angular/core';

Cordova Android Build Failure: Configuration with name 'debug' not found

丶灬走出姿态 提交于 2019-12-11 04:35:32
问题 After adding the phonegap-facebook-plugin to my Cordova project, and building the project for android, it fails with the error: Cannot evaluate module FacebookLib : Configuration with name 'debug' not found My android project structure looks like this: android --> CordovaLib --> build.gradle --> phonegap-facebook-plugin --> chooze-FacebookLib --> build.gradle --> build.gradle --> settings.gradle The root build.gradle file contains this: dependencies { compile fileTree(dir: 'libs', include: '*

Add .so files to Cordova Plugin

醉酒当歌 提交于 2019-12-11 04:27:13
问题 I have developed a Cordova Plugin for my Ionic app, which throws the following error when accessed: java.lang.UnstatisfiedLinkError: dalvik.system.PathClassLoader [DexPathList [[zip file "/data/app/io.ionic.starter-2/base.apk"], nativeLibraryDirectories=[/data/app/io.ionic.starter-2/lib/arm/, /vendor/lib, /system/lib]]] couldn't find "libserial_port.so" I've put libserial_port.so file in the libs folder, at this path: pluginName\src\android\libs\armeabi\libserial_port.so . Then, in plugin.xml

List the files that are stored in the download folder on an Android device

▼魔方 西西 提交于 2019-12-11 04:25:42
问题 How do you retrieve the list of files that are stored in the download folder on android phone. I have an cordova based app that contains a button. When it is press, I would like to show the user a list a files in their download folder and let them select one.. I have the "cordova-plugin-file" installed and I tried accessing the information from the following folders" var localURLs = [ cordova.file.dataDirectory, cordova.file.documentsDirectory, cordova.file.externalApplicationStorageDirectory

cordova InAppBrowser open remote page suport call native method?

人走茶凉 提交于 2019-12-11 04:18:39
问题 I met a problem when trying to open a remote page in cordova. I tried using the InAppBrowser plugin open remote page no call native method. I checked the official documentation. InAppBrowser does not allow access to local methods, but I need to implement this functionality. Can you help me get an insight of how can I do this or get an approach of it? 回答1: An emulation of the postMessage API has been added to cordova-plugin-inappbrowser for Android & iOS by this PR which enables you to post

The app crashes: Unable to add window — token android.os.BinderProxy is not valid; is your activity running?

江枫思渺然 提交于 2019-12-11 04:17:03
问题 We have build a Cordova app with the org.apache.cordova.dialogs plugin installed and JQM. After start (onDeviceReady) we show the dialog using navigator.notification.alert . Then we press HOME button to return to the home screen and after this we get the following error: 06-17 13:39:22.735: E/WindowManager(498): android.view.WindowLeaked: Activity mobi.appcoins.AppCoins has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{16e65b66 V.E..... R......D 0,0-729,437} that was

how to send data or message from java application / plugin to javascript with cordova / phonegap

霸气de小男生 提交于 2019-12-11 04:10:04
问题 I think I'm missing something here. I'm used to sending data from javascript to java and back with calls to execute and back with the callbackContext methods. But if at some points, lets say I have a running thread that needs to send data to the javascript at regular intervals, how should I do that then ? (This assumes that this task is running and has not been triggered by a javascript action, thus no callbackContext is available) 回答1: You can always execute javascript from java doing this:

Ionic app crashes on Android emulator and device

亡梦爱人 提交于 2019-12-11 04:09:05
问题 I'm building an app using the Ionic framework and AngularJS. It used to run fine, now it crashes as soon as it starts in both the emulator and an Android device. What is weird is that it runs fine in the Ionic View app (http://view.ionic.io/). The logcat says that the error is a NullPointerException. What really worries me is that I didn't do any big changes, and another app started to fail as well. How can Ionic Cordova fail like that? The complete logcat for the part of the crash says: ----

Can another developer extract and reuse my native plugin from a cordova app?

寵の児 提交于 2019-12-11 04:05:15
问题 I am creating a native plugin to use with my cordova app for some security specific functions (encryption / decryption etc). Can another developer extract the plugin from my app and use it ? This is my first cordova app, so I don't fully understand how everything works yet. EDIT: In iOS - I will write the plugin in C++ & Objective-c In Java, I will use JNI to access the C++. Will the C++ source be viewable ? 回答1: Yeah, i have not done it myself but im pretty sure you can extract any apk file