Search the Community

Showing results for tags 'apache cordova'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 6 results

  1. m.recupero

    pixijs, how to distribute it?

    hi everybody, I'm developing a browser game with pixijs, I have finished 90%. My problem is: as I distribute the game in the Apple Store or google play market. In this forum, I read that you use cocoonjs, but I don't want use it, because I have to change many things in the project (for example: canvas render, google font, etc...) My game runs fine in chrome and firefox browsers (mobile and desktop) at 60 FPS. I tried to compile the project with apache cordova (PhoneGap), but it run at 12 FPS. This my question on stackoverflow: http://stackoverflow.com/questions/22011274/why-performance-webgl-of-phonegap-is-different-from-firefox-or-chrome I can not compile project with another embedded webview in phonegap, because it is very difficult, there is no documentation and is still unstable!! chrmome webview for phonegap: https://github.com/thedracle/cordova-android-chromeview Firefox webview for phonegap: https://wiki.mozilla.org/Mobile/Projects/GeckoView Any idea? Please give me some advice...sorry form my english. Marco.
  2. With some hacks from these two links: http://stackoverflow.com/questions/21406781/how-can-i-bring-up-the-keyboard-on-mobile-devices-to-catch-the-input-for-drawing?lq=1 I managed to open the keyboard on my android device. However the keystrokes i do are not sent to the Phaser game i.e my Phaser text field is not filled with data. <input id="hiddenInput" type="text" name="hiddenInput" style="position:absolute; left:-1px; top: -1px; width:1px; height:1px; opacity:0;"/> <script> $(document).ready( function() { $("#hiddenInput").focus(); }); </script> I am using Intel XDK and I upgraded my project to use cordova plugins. I installed ionic-plugin-keyboard but it behaves similar, i.e show/hide the keyboard but the input is not detected by Phaser. What do I miss to do or what do i do wrong? Any suggestions?
  3. HappinessSam

    Cordova reward videos

    I have a Phaser game that I'm packaging with Cordova. I've been using this admob plugin for insterstials but I decided I wanted to add some reward videos since I've heard they#re really good. In theory that plugin should be able to serve them but I can't get them to work. I thought the problem might be with my mediation so I tried a couple of other plugins that serve the videos directly (admob doesn't serve reward videos itself), like this vungle one and this UntyAds one. I can't get any of them to work, even if I build them in a clean, empty project. I suspect that I have something wrong with my ads setup but I just wanted to ask if there is anyone here who has managed to get them to work and if there are any gotchas I need to look out for.
  4. Visual Studio provides a nice environment for developing cross-platform apps. To do so you need to first install the Apache Cordova plug-in. Once that's installed you can develop and debug your Babylon.js app using the Ripple Emulator which uses the latest Google Chrome). The problem occurs when you want to deploy to an actual device, like an Android tablet or phone. If you're running anything less than Android Lollipop (< V5.0), your Babylon.js app won't work because it runs in a webview and older webviews to do not support WebGL. The solution is to add CrossWalk to your Visual Studio project. In Visual Studio 15.0, the path is: Project > config.xml > Plugins > Core > Crosswalk Webview Engine (click the add button). This didn't appear to work until I did a Rebuild All. After that, it deployed just fine. FYI
  5. Last update of this information was 22 August 2014. In the hope of collecting together the great wisdom of the Phaser community, I am creating this thread dedicated collecting the issues -- not unlike the CocoonJS thread of similar naming -- between Phaser and Apache Cordova. [For the most part, these solutions work with PhoneGap too. However, at the moment anyway, I'm more interested in addressing the underlying system of both: Cordova.] How does Cordova work? When run on a device, Cordova creates a WebView, adds in API hooks, and loads the project via the FILE protocol. Put basically, it is like running your HTML5 project in a separate instance of the device's browser. However, unlike the device's browser, Cordova has the ability to be extended and granted access to additional functionality like the device's camera, geolocation data, or even barcode scanning through its plugins. Do I need cordova.js? Yes. While it is true that you can run projects without this file, it sets up useful Cordova functionality and populates the window.cordova object with system details. Without it, Phaser will not be able to detect it is running under Apache Cordova. Using -- <head>...<script src="cordova.js"></script>...</head>-- will often be enough to load the script during run-time. (The file itself is added to the project during compilation or as part of established IDE functionality.) What's this 'deviceready' event? [This is now part of Phaser 2.1] Cordova was created to run on different devices with different requirements. One way to generalize all the required runtime tasks was to send a signal when everything Cordova-related was ready. That's what the 'deviceready' event is. Once it is sent, everything that was supposed to be loaded or created by Cordova (such as plugins) should now be ready. For Phaser projects that will use any Cordova plugins, it is highly recommended to wait for this event to trigger before enabling any code. For example, creating a function to load your game would look something like the following -- document.addEventListener('deviceready', loadGameFunction);-- where loadGameFunction is a function to load your game or enable certain functionality for Phaser to use. Common Issues Scaled Viewport Size For devices not running iOS, the following line can be added to the <HEAD> of the HTML file to create a viewport and scale up to the size of the device's screen. <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />For iOS devices, drop the "width=device-width, height=device-height". Audio To enable media playback, you will need to add the Cordova.Media plugin. Once loaded, audio objects will need to be created manually using the Media object. var media = new Media(src, mediaSuccess, [mediaError], [mediaStatus]);[Hopefully, a patch or plugin to detect and use this functionality automatically will make its way into Phaser in the near future.] Debugging Using console.log will send messages to CordovaLog. Android If using an IDE, it will often filter ADB logcat for the specifically named project activity. However, if using the command-line interface or if not filtered directly, using programs like grep or find can help narrowing down Cordova messages. Examples of this would be something like "adb logcat | grep CordovaLog" to filter for log messages from Cordova, including those sent using console.log. The 'Back' button On those devices that have a 'back' button or similar functionality, it is currently possible to exit a Phaser project run in Cordova by pressing or triggering it twice quickly. To prevent this action, you need to catch the event with code like the following: document.addEventListener("backbutton", yourCallbackFunction, false);See the Cordova documentation for greater details. 'Pause' and 'Resume' events Whenever a Cordova instance is pushed to the background on a device, the 'pause' event is triggered. When it again is at the fore, the 'resume' event is triggered. Unless these events are caught by an event listener, the default action for Cordova is to completely reload the page upon the 'resume' event, potentially erasing the states and values of all active variables. To prevent this action, you need to catch both events and handle them somehow. document.addEventListener("pause", yourCallbackFunction, false);document.addEventListener("resume", yourCallbackFunction, false);See the Cordova documentation on 'pause' and 'resume'
  6. I am sure I miss something. I did this to scale my game to available space in my Nexus 7: window.document.addEventListener('deviceready', function (event) {'use strict'; WML.gameObject.scale.scaleMode = Phaser.ScaleManager.EXACT_FIT; WML.gameObject.scale.forceOrientation(true, false); WML.gameObject.scale.pageAlignHorizontally = true; WML.gameObject.scale.pageAlignVertically = true; WML.gameObject.scale.setScreenSize(true); console.log("deviceready " + event);});So yes this event is fired, I get the last log command printed in console. But still the game doesn't fit all into the screen. Anything I should consider further? Plus on my real nexus7 it also goes into protrait and landscape but want it only in landscape. I also have this line in my index.html <script src="cordova.js"></script>Does XDK imports is automatically or I have to include this script in my folder? Not sure where to find it?