cordova

Retrieving source code of site in InAppBrowser

孤人 提交于 2020-05-28 04:03:46
问题 When opening a website in the InAppBrowser, is there a way to retrieve the source code of the website? This is needed for a PhoneGap app for iOs. I was thinking either by a javascript injection that could read and return the source, or by writing it in objective c and make a plugin - if either of these options would be possible. 回答1: I think you can do that by injecting js script after page load event is fired in InAppBrowser. var code = 'javascript:alert("xxxxxxx")'; var ref = window.open(

Missing provider for Ionic's Network native plugin

 ̄綄美尐妖づ 提交于 2020-05-28 03:18:08
问题 I've tried using Ionics native plugin "Network" but it fails because of a supposedly missing provider. In order to avoid any mistakes I've installed a fresh installation of Ionic and the required dependencies: ionic cordova plugin add cordova-plugin-network-information npm install @ionic-native/network Then I've added the dependency to home's constructor: import { Component } from '@angular/core'; import { Network } from '@ionic-native/network/ngx'; @Component({ selector: 'app-home',

How to add android:allowBackup=“false” via cordova plugin

旧街凉风 提交于 2020-05-25 10:44:11
问题 I am now developing a Cordova Plugin , I wanna add android:allowBackup="true" into AndroidManifest.xml , but I do not know how to specify it in plugin.xml . 回答1: The configuration edit that has worked for me was: <platform name="android"> <edit-config file="AndroidManifest.xml" target="/manifest/application" mode="merge"> <application android:allowBackup="false"/> </edit-config> </platform> EDIT Feb-2020: Please refer to answer from @Shashank Agrawal below for cordova-android >= 7 回答2: Answer

Prevent reverse engineering of ionic application

半腔热情 提交于 2020-05-25 07:03:31
问题 Is there a way to prevent reverse engineering of ionic mobile application? As mentioned in Android forum I've activated proguard and built the application in eclipse. A file called proguard was created in my bin folder. It contained something like this view AndroidManifest.xml #generated:6 -keep class com.fg.lolc.CordovaApp { <init>(...); } But I still could reverse engineer the app and I was able to get the code from my APK. Is there a way to prevent this and improve the security of the

Allow Phone Call android; npm run cordova-build-ios; npm run cordova-build-android; whatsapp

允我心安 提交于 2020-05-14 12:52:48
问题 Android Manifest says this: https://developer.android.com/reference/android/Manifest.permission CALL_PHONE Allows an application to initiate a phone call without going through the Dialer user interface for the user to confirm the call. Can I add it to my config.xml-file unter the tag. <config-file target="AndroidManifest.xml" parent="/*"> <uses-permission android:name="android.permission.CALL_PHONE" /> How can I access it? I appreciate: telephone.call('110') Can I call another app with

Allow Phone Call android; npm run cordova-build-ios; npm run cordova-build-android; whatsapp

末鹿安然 提交于 2020-05-14 12:52:47
问题 Android Manifest says this: https://developer.android.com/reference/android/Manifest.permission CALL_PHONE Allows an application to initiate a phone call without going through the Dialer user interface for the user to confirm the call. Can I add it to my config.xml-file unter the tag. <config-file target="AndroidManifest.xml" parent="/*"> <uses-permission android:name="android.permission.CALL_PHONE" /> How can I access it? I appreciate: telephone.call('110') Can I call another app with

cordova: download from url to android download folder

夙愿已清 提交于 2020-05-13 07:52:12
问题 Well before i start i tried below answers from stack overflow. Download file to downloads folder ios/android using phonegap FileTransfer Cordova download path Download a file to Downloads folder of device using Cordova FileTransfer http://www.phonegaptutorial.com/downloading-an-image-from-the-internet-with-phonegap/ But no luck at all. I am trying to download a file from internet. My target is to download the file in download folder on Android phone. I tried all the above answers and also i

Display inside an iframe a html file located outside of the www folder — works in InAppBrowser or parsing the text

孤街浪徒 提交于 2020-05-05 04:49:22
问题 I managed to download some On-Demand Resources into my Cordova App using a custom plugin that I built. What I need to do now is load them inside an iframe in my App. Is this possible?? If they were located in the (sigh, read-only) www folder I could simply point to ${cordova.file.applicationDirectory}/www/game.html ...but being them in the Library folder (eg. see path below) is there a way to display them inside an iframe? ('/var/mobile/Library/OnDemandResources/AssetPacks/2F2887A0-7B16-4S5D

Configure EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE in build pipeline to fetch iOS On-Demand resources from static server

只愿长相守 提交于 2020-05-04 10:46:38
问题 When I archive my iOS App for testing purposes I need to configure it to fetch On-Demand resources from a web server instead of Apple servers. For local development, during the Archive steps in Xcode, I simply choose "Host on Server" instead of "Embed in App" and enter the URL of the webserver where the ODR bundles are hosted. How can I configure that setting programmatically in a build pipeline though? I did read that I need to set EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE to false and add the URL

Configure EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE in build pipeline to fetch iOS On-Demand resources from static server

╄→尐↘猪︶ㄣ 提交于 2020-05-04 10:46:19
问题 When I archive my iOS App for testing purposes I need to configure it to fetch On-Demand resources from a web server instead of Apple servers. For local development, during the Archive steps in Xcode, I simply choose "Host on Server" instead of "Embed in App" and enter the URL of the webserver where the ODR bundles are hosted. How can I configure that setting programmatically in a build pipeline though? I did read that I need to set EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE to false and add the URL