Embed a browser in Libgdx - java

I am writing a cross platform app(PC, iOS, Android) in Java. I would like to integrate facebook into this app. I have been trying to find a uniform method to login, since it is a cross-platform applicaiton. So I have been following Facebook's manual login to try an approach that will work on each platform. I am using restFB to handle the interaction with Facebook after I get the access token from the user. That last bit is causing difficulties. It seems the only way for me to get the users access token is to have them sign in from an embedded browser.
Now I have looked at this similar question, but the problem is that Libgdx is not compatible with JavaFX. So my question is: Is there a relatively simple way to embed a web browser into an app that is built via Libgdx?

So my question is: Is there a relatively simple way to embed a web browser into an app that is built via Libgdx?
Nop

Related

Website to android app approach

I'm a newbie android developer and we have a website that sells some stuff (using a payment gateway), you can also login on the site using credentials, facebook, or google+ login. Now we have a need for an android and iOS app. What is the best approach to port the site functionalities to Android or iOS app? What are the issues I need to consider when I choose one approach? What would be the best approach: native, hybrid (phonegap, xamarine etc.) or using wrapped (using webview as far as I know)? I'm especially interested in the user login part (because I want the user to be able to login to his account if it exists and if not to create it using the website API endpoint - this is how I imagine it), how to solve that when choosing between these approaches? Any suggestions (answers, comments, links, books) would be helpful.
Thanks
My sugestion is to do native, always can reach more performance in multi thread ,high concurrency transactions and heavy applications.
For android, you can build from source an application, and export the html/css content to the smartphone using android.webkit.WebView. Take a look:
https://developer.android.com/reference/android/webkit/WebView.html
I think is a excellent solution for your problem.

converting desktop web app to mobile app?

I am working on desktop based responsive web application where UI/front end will be in HTML/JS and back end point will be either servlets or struts/spring controllers.
My question is say after 3 years i want to have android mobile app , can
I continue to use my servlet as back end code and serves the response coming from android mobile app,
Mine understanding :- I will develop the native UI part(wherever it is required) using android SDK which then can communicate with existing servlets .
Then android app on mobile can render the html returned from my servlets or servlets can return the android specific views. so changes are required only whenever i need custom views(htmls or android specific views) for my mobile application. Is that right ?
after 3 years... can I continue to use my servlet as back end code and serves the response coming from android mobile app
We have no way of predicting the future with accuracy.
Then android app on mobile can render the html returned from my servlets
To render HTML in Android, you use WebView (or maybe a third-party library, though that is uncommon). WebView handles lots of stuff but not everything that a desktop browser does. How well that all works three years from now is unknown, and how well it works today with whatever your Web site does is unknown.
or servlets can return the android specific views
No.
so changes are required only whenever i need custom views(htmls or android specific views) for my mobile application
Can you get that to work? Possibly, but the details will depend a lot on what your existing Web site does and what sorts of client-side technologies it depends upon. For example, Android does not support Flash. There are also technical and security issues with interoperating between Java based UIs and WebView-based UIs, though this is a bit better in your case, as you are only hitting one server (I think).
All that being said, I would never write an Android app this way, and I would never recommend anyone else write an Android app this way. I would revise the Web server to have a proper Web service API, and I would write a native Android app that uses that Web service API, not using servlets returning HTML. The primary place where I would use WebView is when I had material that only exists in HTML, typically because I did not create the HTML in the first place (e.g., user-generated content).
Primarily mine question is can I continue to use existing servlets. I don't think its based on opinion. It should be either yes or no
Of course it is not "yes or no". We have no way of predicting the future, and we know almost nothing about the Web site. Your question collected two "too broad" close votes, and that is a reasonable assessment.

real time turn by turn navigation using Skobbler APIs on a Java app

I am trying to develop a java app that will run on a Raspberry PI. Raspberry PI will be mounted on a vehicle and I will know my position through a gps device. To solve this, I’ve been thinking on a solution like this:
Use a Webview on my JavaFX app and use your javascript API to build a real-time turn by turn navigation app. However, I’ve seen that your web API is not as complet as mobile platforms APIs. My question is: Is what I am trying to do feasible using your APIs? If so, could you please give me a brief description how to do it?
Thanks!
The Javascript API is not a turn by turn API - that is currently something a bit too heavy for javascript to handle (it could be feasible but it's not commercially attractive right now).
In theory you could integrate directly with the C++ code of the SDK as that should be able to run on Linux (depends here on the gcc version used and the OpenGl support offered - send an email to dev#telenav.com with your scenario and they will advise you).
Or if you can run Android on the device then you can use directly the Android SDK.

java or php for developing database driven android app

I have an existing PHP MySQL web app that I want to make an android app for to look up account info, get status info for work orders, upload photos, etc.
I'm new to Android Dev and found a site phpforandroid.net that says I can use PHP to build android apps. 6 years ago I did a basic Java class n learned a little about Java, but not much.
I want to have a login to the app, then present a menu to drill further into heir account info.
My first choice would be PHP if the database interaction can happen, but I don't really know. Anyone else gone down the PHP db driven route, or is Java the way I should go? Any tutorials you would recommend?
What are the community thoughts? THanks.
Why don't you build a smartphone compatible website (i.e. with jQuery Mobile)? You could use your existing PHP knowledge and the app would run on any descent smartphone, not only Android.
How about a mobile version of your web app? You could make it work on other phone platforms, you'd have full control over the code, instant updates without bothering the end user.

Blackberry apps: Native or webapps?

I have read the Blackberry documentation and it is possible to push a notification from a webapp. I am planning to create a Blackberry application that compliments to our webapps. But I am still left in the middle whether to develop a webapp or native Blackberry app. I have also look at how a webapp runs on Blackberry browser and it looks smooth.
From your experience does the native app offer something that the webapp doesn't? Bonus question, is Facebook and Twitter app on Blackberry a native app or a webapp? If it is a webapp, is it possible to make a launcher for the application on Blackberry?
Thanks for your help.
Facebook and Twitter are on both types. The web apps are just a website formatted for a small screen so anything you do in say asp.net will show on a blackberry web app if you program it to. The native app just feels like part of my phone. You can save data on the phone so if your app is a relating to news or something that would be stored I can read it offline or slow connectivity (camping, rural areas, etc...). It can also interact with other feature that blackberry offers such as contacts, email, media player, etc...
If you would like to save anything for the user to view without pinging the internet a native app would be preferred.
It's possible to create a launcher but I haven't created one so I'm not sure of the details. I would assume it's just an app that opens the browser to your URL.
One more thing about a web app would be if your application stores users settings (twitter auth key, etc...) they would need to be stored on your server and not the users phone adding more expense and maintenance.
Good Luck.
Widget is not supported for device software less than 5 , you combine both of web and native development by using browser field ,but you need to consider that its Java Script support is poor
Let's not forget that the blackberry browser is really bad as well. I don't know any BB users who would want to use a web application because of that.
When it comes to native apps, you have some choice however and you are not restricted to java (depending on which OS version you want to target). In addition to the mentioned Java, you can use Widget (link for resources) that behaves like a native app, but can be accessed like a web app.
I was just at innoTech and they had a whole session on this topic. But instead of recaping it let me just post the funny video they showed at the end which sums it all up.
Mobile Dev Rap Battle: Native Code vs. Web Apps

Categories