cordova

Android: phonegap/cordova: switch full screen mode while app is running

浪尽此生 提交于 2020-01-12 10:46:10
问题 I want to switch between full screen mode and normal mode while my app is running. is there any phonegap plugin to do this for me (Android) ? if no, Please tell me how can I switch between full screen and normal in java, called in javascript. 回答1: It's possible to do using this plugin: https://github.com/mesmotronic/cordova-plugin-fullscreen it has functions AndroidFullScreen.showSystemUI, AndroidFullScreen.leanMode, AndroidFullScreen.immersiveMode to do the switch. 回答2: Try the following

IONIC 2 Google Maps Marker Click Event

左心房为你撑大大i 提交于 2020-01-12 09:57:21
问题 I'm trying to get all the markers from the database with this code. But the problem is when I click the marker I always get the last item from the database. When the "alert(record.id);" pops up it always show the last item for every marker. I want to show the id of each marker when I click them. loadMarker(){ this.service.getMaps() .subscribe( data1 => { let loc = data1; for (var i = 0; i < data1.length; i++) { var record = data1[i]; let latlng = new GoogleMapsLatLng(record.lat, record.lng);

IONIC 2 Google Maps Marker Click Event

橙三吉。 提交于 2020-01-12 09:57:20
问题 I'm trying to get all the markers from the database with this code. But the problem is when I click the marker I always get the last item from the database. When the "alert(record.id);" pops up it always show the last item for every marker. I want to show the id of each marker when I click them. loadMarker(){ this.service.getMaps() .subscribe( data1 => { let loc = data1; for (var i = 0; i < data1.length; i++) { var record = data1[i]; let latlng = new GoogleMapsLatLng(record.lat, record.lng);

IONIC 2 Google Maps Marker Click Event

萝らか妹 提交于 2020-01-12 09:56:26
问题 I'm trying to get all the markers from the database with this code. But the problem is when I click the marker I always get the last item from the database. When the "alert(record.id);" pops up it always show the last item for every marker. I want to show the id of each marker when I click them. loadMarker(){ this.service.getMaps() .subscribe( data1 => { let loc = data1; for (var i = 0; i < data1.length; i++) { var record = data1[i]; let latlng = new GoogleMapsLatLng(record.lat, record.lng);

How to create a working progressbar for cordova file-transfer

北战南征 提交于 2020-01-12 07:53:10
问题 just a simple Question: i used the Script from Raymond Camden Progress Event in Cordova File-Transfer and it works fine. It displays the percentage as a text which counts up till it reaches the 100%. This works good, but it doesn't look fine. How can i create a progressbar, that starts by zero and counts up to 100% and has a green bar that grows? Im not so good in javascript so i don't know, how to realise this. This is my Code now: var statusDom; statusDom = document.querySelector('#status')

How to change default browser of cordova browser platform?

倾然丶 夕夏残阳落幕 提交于 2020-01-12 07:31:11
问题 I don't have chrome installed and I mainly use other browsers for development (opera, yandex etc). But the command: cordova run browser uses chrome by default, so it fails with " The system can not find the file chrome.". Can I change which browser cordova uses? 回答1: The only way to change the default Chrome browser is using the --target option. As you can see Chrome is the default browser for the run command. Internally, the cordovaServe.launchBrowser function is called with cli arguments.

Specific questions about gunDB as a standalone DB for a Cordova project

喜欢而已 提交于 2020-01-12 06:55:08
问题 I just found out about gunDB and the concept seems very interesting and I'd like to find out more about it before starting to evaluate it further. If I wanted to build a chat app like the tutorial but implement chat rooms . Would there be a way for clients to only "subscribe" to certain chat rooms only, and avoid transferring the content of every other chat room? How does that affect persistence, if not all data is sync'd to all clients? Do we need to run a special client (ie a server?) that

Basic Authentication fails in cordova ios

狂风中的少年 提交于 2020-01-12 05:53:07
问题 I was trying to make an ajax call with basic authentication on a hybrid mobile ios application. The ajax call returns nothing it just hangs no success nor failure. But the same ajax call fires successfully from android. While i was checking the outgoing request with wireshark i found that the authentication header is missing and a 401 is returning from my server and on subsequent call the authentication header is also send along with the request which returns a 301. But it works with android

'Connection to the server was unsuccessful' error when launching phonegap app on android emulator

て烟熏妆下的殇ゞ 提交于 2020-01-12 04:52:33
问题 I am using PhoneGap to build an Android application, the application is a combination of phonegap + jquery mobile. The application successfully launches in the emulator and I was able to debug the application, until yesterday. Today the application just refuses to launch on the emulator, and I keep getting this error 06-25 09:03:24.453: INFO/System.out(305): onReceivedError: Error code=-6 Description=The connection to the server was unsuccessful. URL=file:///android_asset/www/index.html 回答1:

Getting error while generating the .apk file if proguard is ON

浪子不回头ぞ 提交于 2020-01-12 04:06:09
问题 I am using proguard to obfuscate the code. I am getting the following error in console Proguard returned with error code 1. See console Warning: org.apache.cordova.CameraLauncher: can't find referenced class org.apache.commons.codec.binary.Base64 Warning: org.apache.cordova.CameraLauncher: can't find referenced class org.apache.commons.codec.binary.Base64 Warning: org.apache.cordova.CordovaWebView: can't find referenced method 'WebView(android.content.Context,android.util.AttributeSet,int