Which Platform of Unity is best for Facebook Canvas App - facebook-graph-api

I want to deploy my Unity3D game on Facebook as canvas App. There are two platforms in unity version 5:
WebPlayer
WebGL (Preview)
I have no idea about both of these builds. I am using Parse to store my user data. And Facebook Unity SDK for social gaming. I have built for IOS platform and now for Canvas App deployment I want to know:
which one of these would be best for Canvas App?
I want to know if there are any issues regarding Parse API or Facebook Unity SDK for
WebPlayer/WebGL build?
EDIT:
I have built for WebPlayer and i can not run it on Google Chrome.
does it have to do anything with Canvas App too?
I have built for WebGL and tried to run it on Google Chrome and got this alert:
( I am using Google Chrome Version 44.0.2403.107 (64-bit) )
Any suggestion/help is highly appreciated.

I will suggest you to not build your game in webplayer, because chrome is dropping support for unity webplayer(Google Chrome version 42 and later has disabled all NPAPI plugins), and other browser will also drop the support sooner or later. The best way forward is to use webGL. WebGL in unity is still getting evolved, but this is the future. I also have developed game for webGL, I didn't face much problems except data storage. Parse does not support webgl yet, you have to look for other services. In my case I have build my own php server and it is working fine. Anyways you have to choose what is best in your case. You should use webGL , but thats my opinion.

The error message is more or less self-explanatory: Chrome doesn't support running Unity WebGL when it is run from a local file on disk, because of Chrome security. This is not a real problem, as in production it will always be run from a webserver (http://).
During development, your options are:
Start chrome with access to local files: chrome.exe --allow-file-access-from-files
Host a local webserver (Apacha/WAMP, IIS, etc)
Use firefox

You are correct. Building the unity for the web is the way to go. You select web from the build settings and you can upload it to the facebook canvas. The thing with chrome is that it no longer supports NPAPI and that is what the Unity web players uses. You can manually enable it and try out your game in chrome. But for the majority of chrome users unity web player no longer works.

Related

How to build APK (signed) from hybrid app made in Framework7

I've experience in building native android applications. But I'm completely new to hybrid application development and Would like to use Framework7.
I'm starting to use it. I don't know how to build the project and get an install-able file (or for distribution in playstore).
Any help is appreciated.
Cordova is a good way to start.
When I used to develop Hybrid apps, Cordova was the way to generate APKs.
I really enjoyed it, since it has a lot of Plugins, like FireBase Cloud Messaging Plugin to receive notifications within your hybrid App. It's more than a simple WebView App.
Apache Cordova is an open-source mobile development framework. It allows you to use standard web technologies - HTML5, CSS3, and JavaScript for cross-platform development. Applications execute within wrappers targeted to each platform, and rely on standards-compliant API bindings to access each device's capabilities such as sensors, data, network status, etc.
Use Apache Cordova if you are:
a mobile developer and want to extend an application across more than
one platform, without having to re-implement it with each platform's
language and tool set.
a web developer and want to deploy a web app that's packaged for
distribution in various app store portals.
a mobile developer interested in mixing native application components
with a WebView (special browser window) that can access device-level
APIs, or if you want to develop a plugin interface between native and
WebView components.
Here are all the steps needed to start with Cordova https://cordova.apache.org/docs/en/latest/guide/cli/index.html
Also, I used to follow these steps to generate a signed APK so it's possible to launch it on Google Play.
How do I put my cordova application on the android play store?

Do I have to use jquery mobile with phonegap to make a hybird app

I have developed a web app using html, css, jquery and django, and has made it compatible for the screen in mobile devices. But now I want to make it a hybrid app for android/ios and users can install it for extra features. Googled and found phonegap to be a perfect solution. On further searching for the tutorial, most of the tutorial are using jquery mobile for the purpose. My question is, do I need to use jquery mobile to develop a phonegap hybrid app?
No, its not needed, jQuery, without mobile version, its perfectly capable of working with Cordova (I have also made several professional projects with it).
The only limitation is with some touch events, like swipe or pinch to zoom, in what you are going to need another library, like hammerjs

Ionic app startup time

Just getting into this ionic framework. build an simple app with just a tab and menu, deploy to android phone. it seems like it takes a good 3 seconds to load. the black screen last for 3 seconds then the app shows. I also try the ionicview app from ionic. similar experience. my question is, is it just something I missed or it's just one of the draw back of this kind of hybrid app? it make sense that the webview need to load and parse the js and html then render the UI.
Crosswalk provides a bundled Chrome Webview with the app, resulting in better performance and predictability. It helps a lot on older Androids and also speeds up the newer phones.

Is it possible to build offline app with Appcelerator and Rhomobile?

I have recently found those two look-alike solutions/IDE for cross-mobile development: Appcelerator and Rhomobile (I know there are more) and I have questions regarding those two platform:
1) I believe the only way to build the view is using HTML, which I like alot the ideas. But, does that mean the application itself isn't available if the mobile is offline?
2) Do you guys know if it's possible to publish the application to the App Store and Google Store?
3) Are there any simulator for different mobile and do they support all those slide/tab events?
4) And finally, are there a way to transfert the App on your mobile phone without having to publish it anywhere.
Please note that I have no knowledge at all about mobile app dev and those two solutions (Appcelerator, Rhomobile) would be perfect for me as I am familiar with Javascript and HTML.
Thank you!
Ok I have only used appcelerator but:
1) a webview is like a browser without the address bar, it simply parses HTML, where it gets it from is up to you. If you write the HTML and pass in a file well then yes it can be offline, if it is used to parse a response from a webpage well then no as it needs to send a http request to the webpage.
As many people seem to mistake (for a reason unknown to me as all the documentation states other wise), appcelerator is not the same as phonegap, appcelerator uses its own javascript based API to allow developers to make native apps, it is NOT a webview wrapper. It is offline by default and allows you to send http requests if you need something online.
2) yes you can publish to the app store and the google store from appcelerator, the documentation walks you through the process.
3) Appcelerator requires you to download either the IOS sdk or Android SDK which come with simulators, appcelerator / the emulators support the standard events found on these devices.
4) With Android to can build a .apk file and distribute however you wish, with IOS the only way is to publish to the app store. the only other way is to make a mobile website instead of an application

Server Generated web screenshots?

One problem I've been toying with off and on is a service that requires my server to produce a screenshot of a webpage at a given url. The problem is that I don't have any idea how I would accomplish this. I mostly use a LAMP software stack, so answers that were given with that in mind would be the most helpful. Again the basic requirements are: Given a url, the server needs to produce an image file of the rendered web page at that url. Thanks in advance!
You might also want to take a look at webkit, it's known for being easier to embed (used by Adobe for AIR, by Google for Chrome, by Apple for the iPhone...) then other rendering engines. This might take a little more work to setup, but it would be a lot more stable than some hack that launched a webbrowser and took a screenshot.
IF your server is a Mac, then I recommend webkit2png, which is a short python program that leverages WebKit's Objective-C API to render an URL. Personally, I use it in combination with WWW::Mechanize to walk my development site and make screenshots of every page -- useful for testing functionality, showing clients and keeping screenshots up-to-date. The resulting screenshot is perfect, but sometimes very tall for long, scrolling pages.
IF your server has a non-bare-bones Linux distro with KDE installed, then you might try khtml2png. I have not tried that myself, but saw it mentioned on the webkit2png page.
PhantomJS is a headless (commandline) WebKit-based browser which can be easily scripted to save a screenshot of webpage.
You actually need to have the server launch the web browser in question and take a screenshot of the application with the appropriate libraries. Apache will not render the page for you so you have to have software that will.
Yes, that is what is needed. I do this in asp.net, and I actually create a WebBrowser object that is avaialable in the .Net framework class libraries to generate the screenshot.
I use the http://webthumb.bluga.net service for thumbnail generation. Robust, powerful, easy to use, and very reasonable rates. I have a high traffic production website using this service and it works very well. Given the difficulty of creating a robust web screenshot service, it's nice to have someone else do the hard work.
A non-free solution for Java is WebRenderer. Interesting feature: it can emulate Safari, IE or Firefox browsers when rendering. They have a desktop version and a headless server version. Also they have example code showing how to render a screenshot image of a webpage.
virtual framebuffer X server
I would rather recommend XVFB (virtual framebuffer X server) is the best solution for taking screenshots of a headless server. Virtual framebuffer X server xvfb provides an X server that can run on machines with no display hardware and no physical input devices.
I am using that on my server for testing URLs and taking its screenshot. We are using Ubuntu & XVFB + FIREFOX. It is working fine. Modify according to your needs.Take a look on these articles. It might be use full for you.
http://www.semicomplete.com/blog/geekery/xvfb-firefox.html
http://linux.about.com/cs/linux101/g/xvfb.htm
http://www.xfree86.org/4.0.1/Xvfb.1.html