I have been developing GWT application for a while and I'm trying to port my app to Android. I'm very new to Android but it seems that the ADT share many similarities with GWT so the learning curve might not be very steep.
There's what I read from GPE 2.4
Android and GWT clients that are capable of talking to the same App
Engine backend using the same RPC code and business logic.
It would be great to share the same backend which I spent a hell lot of effort in design and implementation. However, I'm not using AppEngine and impossible to switch to it either. I'm wondering if the Android app can still share the same RPC structure with GWT without using AppEngine. Thanks.
If you're still in need of a solution, check out GWT-SyncProxy (Disclaimer, I recently joined the project). I just put out a 0.4 release that has an Android Library that allows you to make GWT RPC calls from Android (or Java standalone apps using the regular library).
https://code.google.com/p/gwt-syncproxy/.
The library can utilize Android accounts if you do switch to GAE, but it's definitely not required.
You can try to use http-dispatch. It is the adapted gwt-dispatch framework which can be used on Android platform. Http-dispatch uses default binary serialization so it works from the box for many types of objects. Currently it is in alpha but you can try http://code.google.com/p/http-dispatch/
Related
i'm asking if i can work with java ee and spring like a backend to developp an android application, also I wonder if I can execute an android app on iphone or it must be ios app to work on iphone thanks :)
You can write Android app in Java or Kotlin. Java EE that is mentioned in your question is a platform for developing enterprise software, it's not related to Android app development. Keep in mind that you are going to develop an app for the phone, so the app should take as little as possible memory. It's better to avoid some practices heavily used for the backend development, for example reflection. That might slow down your app.
If you need dependency injection framework you might be interested in dagger2. If you need http client you might be interested in okhttp and retrofit2 for calling webservices. Also there are several ORM frameworks for Android - room and greenDao. There are much more frameworks, I'm mentioning only the most popular ones. Most Java libraries are suitable for Android.
You can't execute native Android app on iOS. If you are interested in multiplatform app development you can try looking into react native
Here is our case:
We exposed some POCO types using OData by ASP.NET Web api, mainly the schema of models. What we want to achieve is share these schema with iOS and Android clients. I am not familiar with both iOS and Android developments, isthere any methods let us develop just like normal .NET application style, add something like ServiceReference to the project, so that we can use those models? Or some other ways to allow make use of those stuffs.
We just focused on latest version of iOS (iOS 7 / iOS 8), and Android 4.4+. Any shared experience is welcome.
The following libraries are both for OData V4 only.
For iOS, there is the ODataCpp library owned by the same team who implements the ASP.NET Web API OData at Microsoft that you can try out. It's recently open sourced and will have its first binary release soon. It supports iOS as a target building platform and iOS apps can be built using it.
For Android, there is the Apache Olingo Java Client. It's still under development but according to the recent communications on developer mailing list, its first V4 client release will be very soon. You can have access to the source code on it's Git repository. It's been tested for building Android applications.
Also, while not a server side native application, a strong stop gap is the library Odata4js, which allows you to Prototype PlainObject Models, and use data-driven js libraries to manipulate/work with the data. Javascript would work on both platforms until official APIs release, and OData4Js works very well with other major releases such as Angular, jQuery, etc.
I am building an Android app that I think has potential to reach 10 million users.
I realy like Python and I am not a huge fan of Java. The example application that Google has made for an appengine-backed Android project uses Java. I have only found Python libs for backends that are made by private people. Are these good enough?
Is there no official Google Python code for an Appengine GCM backend?
I don't want to start building something around technology that does not cut it.
Edit:
Even if Python is slower, maybe the programming language is not the bottleneck anyway?
Python on App Engine can sustain the load as good as Java does, so o need to worry about scaling. (It will cost you though...)
Python on App Engine is very mature, well documented, and there are plenty of code libs, frameworks and examples. No problem in using Google Cloud Messaging, there is a RESTful API that you can use from python, see here: http://developer.android.com/google/gcm/http.html
I need to build a simple web service in Java, the context is Google Application Engine.
Two clients are needed as well: Android and Web Page, for browser.
I consider something like Restlet, and want to re-use from it Android and GWT clients.
Could, you, please, give me a hint, whether it is a good way to go?
Could you advice others?
In particular, I could not find, how this technology coexists with WSDL, and if
I am going to be able to use it?
Restlet Framework is mainly used to develop RESTful web services, even though in practice you can also issue and receive SOAP calls to bridge with older systems (no WSDL support though).
For help on GWT and Android client sides, see:
http://wiki.restlet.org/docs_2.1/13-restlet/21-restlet/318-restlet/303-restlet.html
It depends a lot on whether you wish to build cross platform as in phonegap or keep it simple as in mobilewebapp example provided in sample folder in gwt zip file you download.
The mobilewebapp sample does not access smartphone features but will be accessible by browser on any mobile. phonegap or similar frameworks like titanium,sencha provide api to access smartphone features.
Fore more information -
http://www.sapandiwakar.in/technical/api-research-study-iphone-and-android-applications/
Sencha Touch 2 native build vs wrapping Sencha Touch 2 in Phonegap
Creating a mobile app using Google App Engine and GWT?
There are so many cross platform libraries that I am kinda lost to get an answer to a very basic java question.
I have a java library that works well on Android. It does not use any android specific functionality and also builds on the standard java sdk. This library uses sockets (plain simple Socket, ServerSocket kinda architecture) to communicate between the library and a server hosted (may be on a ec2 or some virtual public server).
Now my question is, can other developers import my java library (built using java sdk) to a application that uses html/css for User Interface, package all of this into a mobile application for iPhone (use native iPhone packaging, and a WebView to launch) ? Also can I ship this library so other software developers can build a web application to work on desktops and cross browser's ?
Some questions on stackoverflow are close to what I am looking for, but not quite there.
Developing Mobile Apps for Multiple Platforms (without a cross-platform framework!)
Will a webserver be able to use my library that connects to the server using sockets ?
And will every client that connects to this webserver create a new instance of my library ?
If you library doesn't use any dependencies on either Android or any other library, another developer can use it pretty much anywhere they want. Although keep in mind that platforms like EC2 may have a preferred way of using communication. (I'm no expert on EC2, so you'll have to see what they use.)
So I guess it's better to abstract out that socket functionality for good.
I don't think you can use a Java library in iPhone. iOS terms of use clearly states that you cannot use a compiler or interpreter on the device other than the one given in the SDK and the webkit javaScript engine in Safari. So there's no way your Java code is going to run on iPhone (without jail-breaking.)
I don't understand the question about webView. Do you mean navigating to a site that is powered by your library ? If yes, then yes as long as you keep it in the boundaries of Safari. (no Flash, no Java Applet .etc.)
Will a webserver be able to use my library that connects to the server
using sockets ?
For the most part, yes. But as I said, the platform may not allow raw connections, so it's good to abstract it out.
And will every client that connects to this webserver create a new
instance of my library ?
This depends on the design of your library and its public APIs.
Hope this helps.