cordova

Can phonegap splash-screen display gif image?

烂漫一生 提交于 2020-01-14 13:36:25
问题 I tried to set a splash-screen image for my phonegap app.When I set a static image such as png, everything goes well. Now I need a loading animation on my splash screen and I try to set a gif image instead of static image. However, after I do that I can not start my app any more. Can phonegap splash-screen be set as gif image? 回答1: This isn't something Cordova/PhoneGap supports out of the box. But if you're willing to dive in to Java/ObjC here are some possible approaches: You could make a

Failed to load webpage with error: The requested URL was not found on this server

∥☆過路亽.° 提交于 2020-01-14 09:52:08
问题 I'm experiencing a weird error with my PhoneGap app: every odd time I run the simulator (or the test deployed app on my phone), I get the error Failed to load webpage with error: The requested URL was not found on this server. It works every even time I run the simulator. This has been happening since I first deployed my app. I was not using any plugins at the time, but since then I've been trying to get the Facebook iOS SDK working, and this probably isn't related but the times that my app

content-security-policy meta tag for allowing web socket

爱⌒轻易说出口 提交于 2020-01-14 08:45:08
问题 Situation: autoreload of phonegap serve blocked by content-security-policy meta tag Adding content security policy prevents auto-reload of phonegap serve utility. This is built on top of cordova serve but auto-reloads the app on file editing. It works by injecting socket.io in index.html . What should I specify in my CSP meta tag that will allow socket connections to my laptop. Here is my current CSP meta tag: <meta http-equiv="Content-Security-Policy" content="default-src 'self' 192.168.0

ionic 2 DatePicker

不想你离开。 提交于 2020-01-14 08:44:06
问题 I'm new to ionic and I'm playing with ionic 2 beta. I'm trying to implement a native datepicker using cordova plugin like in the documentation. I've fully copy/paste the example, and I get "ReferenceError: DatePicker is not defined on Nexus 5 Emulator and Archos android phone. openDatePicker() { var options = { date: new Date(), mode: 'date' }; function onSuccess(date) { alert('Selected date: ' + date); } function onError(error) { // Android only alert('Error: ' + error); } DatePicker.show

Can I schedule events/callbacks at specified times each day in PhoneGap

纵然是瞬间 提交于 2020-01-14 08:15:08
问题 Is there any way (in PhoneGap) I can schedule events or callbacks to happen at designated times each day? I guess I'm looking for something like Android AlarmManager, so that I can trigger some notification each day at a certain time, that would then prompt the user to launch my app. 回答1: You could use this: https://github.com/katzer/cordova-plugin-local-notifications.git It allows you to use local notifications of the device. Once you have installed this plugin you gain access to the window

Can I schedule events/callbacks at specified times each day in PhoneGap

末鹿安然 提交于 2020-01-14 08:14:10
问题 Is there any way (in PhoneGap) I can schedule events or callbacks to happen at designated times each day? I guess I'm looking for something like Android AlarmManager, so that I can trigger some notification each day at a certain time, that would then prompt the user to launch my app. 回答1: You could use this: https://github.com/katzer/cordova-plugin-local-notifications.git It allows you to use local notifications of the device. Once you have installed this plugin you gain access to the window

How to scale a Phaser 3 game and their assets to it works in smartphones and tablets?

北慕城南 提交于 2020-01-14 08:13:40
问题 I'm new working with Phaser 3 and Apache Córdova for create mobile Android games. I have created a game of 1200 x 800 px. It looks fine in tablets but in smartphones doesn't. How can I scale it to work in multiple screen sizes? Additionally, I need help to force to landscape the game orientation using Phaser 3. Thanks 回答1: function create () { window.addEventListener('resize', resize); resize(); } function resize() { var canvas = game.canvas, width = window.innerWidth, height = window

phonegap run android not working and no error message

妖精的绣舞 提交于 2020-01-14 07:19:12
问题 I had worked with Phonegap for a period of time and it workd good but yesterday I got stuck in a problem with installing the app on my device using command line: \>>phonegap run android it return [phonegap] executing 'cordova run android'... [phonegap] completed 'cordova run android' and no error message But nothing happened the app as it does not get installed in my device nor open the emulator. I try to create new project, update Phonegap, update android platform, update SDK and uninstall

Phonegap file plugin- copy file from app package to persistent storage

删除回忆录丶 提交于 2020-01-14 06:32:16
问题 Issue: Using Phonegap on iOS I want to copy a image from the application package example http://localhost/img/test.png to the local persistent storage. I'm ok getting the persistent storage via window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail) . But how do I get the folder of the www root? Per file plugin docs I assume I somehow need to use cordova.file.applicationDirectory. Unfortunately the doc doesn't specify where/how to do that. I've tried some ways but no luck so far.

Cordova IOS camera plugin not working when trying to open from inappbrowser

萝らか妹 提交于 2020-01-14 06:26:28
问题 I am working for a hybrid mobile app using cordova 6.0.0. According to my requirements , I have to open dynamic url in web view. The url would be provided by api response. I am using the cordova in app browser plugin for web view. https://github.com/apache/cordova-plugin-inappbrowser Now when user clicks on any link in the page opened in the web view , I have to catch that click event and find the href value of the anchor tag on which user had clicked. And if target url will match my