Search the Community

Showing results for tags 'webview'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

Found 12 results

  1. I tried with the good "old" Crosswalk but sadly Android cmd tools were changed so I now cannot build apps with Crosswalk. Now there is Android 4.4, KitKat, WebView. I managed to make a hybrid app up and running, however I see the grey background or blank/black canvas instead of my game. I found some links, and people say that I should disable hardware acceleration for WebView which i did, and then the black canvas appeared. What do you recommend, switch to newer WebView version or I am missing something? Android manifest xml: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="sandhiflowers.game.com" > <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme" android:hardwareAccelerated="true" > <activity android:name=".MainActivity" android:hardwareAccelerated="false"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> <uses-permission android:name="android.permission.INTERNET" /> </manifest> As you can seen, hardware acceleration was enabled application wide, but disabled only for the MainActivity. Before doing this, no canvas was visible, only the gray page background. When I disabled hardware acceleration then this black rectangle appeared. My MainActivity.java file: package sandhiflowers.game.com; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.webkit.WebSettings; import android.webkit.WebView; public class MainActivity extends AppCompatActivity { private WebView mWebView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mWebView = (WebView) findViewById(R.id.activity_main_webview); WebSettings webSettings = mWebView.getSettings(); webSettings.setJavaScriptEnabled(true); mWebView.setWebViewClient(new MyAppWebViewClient()); } @Override public void onResume(){ mWebView.loadUrl("file:///android_asset/www/index.html"); super.onResume(); } @Override public void onBackPressed() { if(mWebView.canGoBack()) { mWebView.goBack(); } else { super.onBackPressed(); } } } Any ideas?
  2. In Android 5.0 (Lollipop), the WebView has moved to an APK so it can be updated seperately to the Android platform. (WebView for Android) I tested one of my games (Sudoku Tips for Android) on Samsung Galaxy. It seems that finally Android WebView is fast enough for mobile games! That's great news as now you can use your HTML5 skills on mobile apps, wrap your existing HTML5 games easily as Android apps and build mobile games with very small footprint (< 5MB).
  3. Hello, New around here, first post.... To be brief, I'm looking for recommendations for native app wrappers for html5 games along the lines of PhoneGap / Cordova (which I've used) that do more to protect your game's source code and assets. Phonegap currently provides zero protection. The apk can be unzipped an everything is right there. Does something like this exist? Maybe something that will compile or encode your wrapped assets? Thanks!!
  4. 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.
  5. Game scaling problem

    Hello everyone! I am just getting in Game development in Phaser. I am trying to create Android application and I am using this: https://build.phonegap.com/apps to convert my Phaser code into .apk file. Everything works great and it is the same as in the browser. Also I am scaling the content with devicePixelRatio. However, after the last update(today) of the Android WebView there is a problem with my app... I can't see the whole world and everything is hidden anywhere outside the display. I tried some things, but nothing can fix my problem! I am looking forward for your replies! See the pics before/after:
  6. I have a game that uses pixijs as an engine. And when I try to load it trough adobe air web view the game doesn't show. In the logs it would appear like the javascript and everything is working. But the canvas is not displayed. Did anyone experience issue like this or tried to run games in webview. I tried running bunny example and it didn't work as well. Thank you all.
  7. CocoonJS + Phaser fullscreen problems

    Hi all, I have an app I am working on that almost done and looks nice on my phone (Samsung Note 4). However, my scaling technique is not working on all phones, leaving some screens looking like this pic attached (hope you can see the white border around the off-white screen! The pic is HTC One X. Similar issues on tablets). My code setup is pretty simple: index.html file: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Title</title> <script src="js/phaser.min.js"></script> <script src="js/main.js"></script> </head> <body> <center><div id="game"></div></center> </body> </html> Sizing inside of main.js: var w = window.innerWidth * window.devicePixelRatio; var h = window.innerHeight * window.devicePixelRatio; var game = new Phaser.Game( w, h, // Width, height of game in px Phaser.AUTO, // Graphic rendering "", { preload: preload, // Preload function create: create, // Creation function update: update } // Update function ); I'm resizing screen elements according to w and h, so everything is designed to respond to w/h. Is this a problem with my div structure? I tried completely removing the html file... using canvas introduces a whole new host of problems though, with scale still unresolved (in canvas either does not show up or appears too large). Also tried changing the div name, using other techniques like: w = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) * window.devicePixelRatio; I can't seem to figure out how to get this to fullscreen. I am using WebView+ (not canvas), and min android version is 2.3. Help appreciated
  8. webview in phaser

    hello, i want to insert an ad in my phaser game. i have seen this things from anthor 2D html5 engine. var webView = new LStageWebView(); webView.setViewPort(new LRectangle(10,680,LGlobal.width,60)); webView.loadURL("http://lufylegend.com/ad/game_vertical_01.html"); webView.show(); it contains an ad WebView in the game。 can any body help ,thanks.
  9. In case some of you haven't read or notice about this, WebGL is now fully supported in iOS 8 Safari and its WebView. Guess preparing a new branch for pure WebGL game/engine would be nice for now. http://blog.ludei.com/webgl-ios-8-safari-webview/
  10. I can't find a good answer to this question. I want to create an HTML5 game with phaser framework and convert it into Android/iOS app (webview). The game suppose to work a lot with database (update, select) Do any one can suggest me the right way to work to be able after that to convert it with minimal time wasting? Thanks
  11. Hello, I was wondering if you guys have some experience with using PhoneGap/Cordova to package your game as an Android app. I've recently tested both Cordova and PhoneGap for a simple sprite draw on canvas on Android 4.4 and the it seems terribly slow compared with the same code in the Android Chrome browser. Also, it seems that both Cordova and PhoneGap don't respect much the config.xml file settings. I've tried to force the game to run only in landscape and while there is this option in the config.xml it is not actually used by the CLI build tool. I've had to manually modify the AndroidManifest.xml in order to achive the desired result. Obviously, Corodova and PhoneGap still need a lot of polishing. Ion
  12. I need to execute some AI code, and it takes too long. So I use web workers when executing the game in a browser, and a webview (that executes code in a different context) for CocoonJS. I tested my game in Android, using CocoonJS launcher,, and is working ok, the code is executing in a background thread, and UI is not blocked. But I tested it in iOS (using CocoonJS launcher too) and UI is blocked while IA code is executed.... Do you know why this behavior on iOS?