hybrid-mobile-app

Calling a C# function through Javascript onClick event in WebView in Xamarin.Forms

喜欢而已 提交于 2019-12-01 07:06:27
问题 I have a post type WebView which I managed to bind with the service response as string but I have some links like related posts which have their ids. On clicking those links I want the user to go to that article. I have tried many solutions but its look like the JavaScript doesn't calls on click, it calls on load because my complete WebView is treated as string and if I concatenate it, it definitely doesn't remains a script. Here is my complete WebView code and the screenshot attached is the

GPS coordinates in background in cordova app

杀马特。学长 韩版系。学妹 提交于 2019-11-30 18:32:50
I'm currently doing a hybrid app using ionic/cordova. The app needs functionality where it pings our backend with its location every 1 minute or so and the backend API will answer if anything interesting is nearby. If the answer is yes the app will queue a local notification which hopefully will make the user open the app. This functionality is needed when the app is in background mode and even when the phone is locked. The app needs to be able to be deployed to both app store, google play and eventually windows phone. I'm currently using a combination of these three plugins: https://www.npmjs

XMLHttpRequest cannot load file from android asset folder on emulator

吃可爱长大的小学妹 提交于 2019-11-30 15:26:29
问题 I am new to hybrid development. I wrote a small application which launches webview. I have XML, JS files copied in /asset folder. App works fine on my samsung tablet but I get following errors on emulator 05-30 06:09:07.080: I/chromium(1245): [INFO:CONSOLE(0)] "XMLHttpRequest cannot load file:///android_asset/resource/service_config.xml. Cross origin requests are only supported for HTTP.", source: file:///android_asset/Startup.html (0) I got to know it happens due to chrome browsers security

XMLHttpRequest cannot load file from android asset folder on emulator

江枫思渺然 提交于 2019-11-30 14:35:46
I am new to hybrid development. I wrote a small application which launches webview. I have XML, JS files copied in /asset folder. App works fine on my samsung tablet but I get following errors on emulator 05-30 06:09:07.080: I/chromium(1245): [INFO:CONSOLE(0)] "XMLHttpRequest cannot load file:///android_asset/resource/service_config.xml. Cross origin requests are only supported for HTTP.", source: file:///android_asset/Startup.html (0) I got to know it happens due to chrome browsers security model and android webview too uses the same component as chrome browser. But all these largely related

ionic android build - not enough memory to start jvm

╄→гoц情女王★ 提交于 2019-11-30 12:33:35
问题 When trying to create an android apk file using ionic and gradle, i get an error FAILURE: Build failed with an exception. * What went wrong: Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the user guide chapter on the daemon at http://gradle.org/docs/2 .2.1/userguide/gradle_daemon.html Please read the following process output to find out more: -----------------------

How to use Ionic Framework for Web App Development?

血红的双手。 提交于 2019-11-30 10:19:34
问题 Is it possible to use ionic frameowork for regular Web Applications rather than wrapping it in Cordova? 回答1: This is possible if you include the components of www/lib/ - This folder contains the core of ionic(the ionic framework + angularjs) and you can proceed from there. However it's important to note that ionic was built on top of angularjs, specifically with mobile in mind. To get better results for web app development, you should consider using core angularjs(for functionality) and

Generate non-debug apk from ionic

被刻印的时光 ゝ 提交于 2019-11-30 08:40:05
I am using ionic framework to generate apk for android platform. After running ionic build android , an android-debug.apk is generated. How can I generate a non-debug apk which is smaller and faster? This is my android release shell script IFY clear gulp ionic build --release android jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore "path/to/your/keystore" "platforms/android/build/outputs/apk/android-release-unsigned.apk" "keystore alias" -storepass xxx -keypass xxx /path/to/android-sdk/build-tools/23.0.2/zipalign -v 4 "platforms/android/build/outputs/apk/android-release

Cordova Info.plist NSCameraUsageDescription key is missing

送分小仙女□ 提交于 2019-11-30 03:00:35
After recent changes Apple requires specific keys if your app attempts to access privacy-sensitive data. So I added NSCameraUsageDescription key in my config.xml like this: <platform name="ios"> <config-file parent="NSCameraUsageDescription" target="*-Info.plist"> <string>We are using a camera to </string> </config-file> </platform> Then cordova build ios --release --device produces the ipa which apparently doesn't have the right info in info.plist. It feels like I'm missing something. Question 1: What do I need to put into config.xml to solve NSCameraUsageDescription issue? Question 2: Is it

GPS coordinates in background in cordova app

元气小坏坏 提交于 2019-11-30 02:46:10
问题 I'm currently doing a hybrid app using ionic/cordova. The app needs functionality where it pings our backend with its location every 1 minute or so and the backend API will answer if anything interesting is nearby. If the answer is yes the app will queue a local notification which hopefully will make the user open the app. This functionality is needed when the app is in background mode and even when the phone is locked. The app needs to be able to be deployed to both app store, google play

ionic android build - not enough memory to start jvm

◇◆丶佛笑我妖孽 提交于 2019-11-30 02:07:32
When trying to create an android apk file using ionic and gradle, i get an error FAILURE: Build failed with an exception. * What went wrong: Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the user guide chapter on the daemon at http://gradle.org/docs/2 .2.1/userguide/gradle_daemon.html Please read the following process output to find out more: ----------------------- Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could