Converting Android app to Java Desktop app - java

I developed an application in Android. Now i want develop same application for Desktop using Java. Is there any tools or procedure to convert existing Android app code to Java Desktop app.
Thanks in advance.

Android application will definitely not work on desktop computers out of the box, unless using an emulator. However, as specified by Android documentation:
Android platform using the Java programming language
Android uses Java. That means any java code that is well encapsulated in a domain layer independent from the android UI can be reused as part of a java desktop application.
If the application is well designed and GUI well separated from domain and other layers, this will boil down to only converting android UI elements (eventually along with a presentation layer) into java desktop components (SWING...)

Related

How to make a mobile app using HTML CSS and JS?

I am planning to develop a mobile app using HTML CSS and javascript.i plan on storing data in a local file instead of a database.how can I develop this? any ideas? The app will run in the browser of the mobile device. (this eliminates login)
The concept of the project is good.ive also designed the UI.
I think you're talking about making a website with a javascript app in it. Mobile apps are made with swift for IOS and android apps are made in java or c++.
There are programs that will take your website and put it inside an application container (mostly for android) but these programs are not recommended.
I would recommend learning swift or Java or c++ and make an app or using your html/css/javascript knowledge to make a web application.

how can make an application for IOS in java?

I know that you can create an iOS application on Xcode if you own a mac either using swift or objective-c code. How can I go about creating an IOS app with java or on a regular windows computer in a different programming language?
You can't distribute iOS apps from non-mac OS.
Nevertheless, you have such options as Xamarin for creating iOS apps using C#, or React Native - using JS, but, again, you won't be able to distribute, or even compile it for try, without Mac
UPDATE
Have just tried React Native and it's possible to view how your app will look like without mac
You can create hybrid mobile apps using
Ionic.
Ionic is an open-source front-end framework for creating mobile apps with HTML5 and JavaScript. Since the apps are loaded in user's browser you won't need of a mac for developing mobile apps and will be compatible for iOS, android, etc.
Find out more here http://ionicframework.com/
Additional technologies:
You may also like to try NativeScript https://www.nativescript.org/, it's cross-platform for developing native iOS and Android, using angular with TypeScript or pure Javascript, unfortunately you will need a mac to compile, test and distribute iOS apps.

Converting responsive web app to Mobile app?

I have my responsive web application in place which works across all browsers. Now i am planning to work convert it into
mobile application. Did some googling and can think of below ways to come up with mobile app
Approach 1 :-
Can be done with the help of WebView (which actually will work as thin wrapper)
Approach 2 :-
Native App:- . Develop Native app. Now, If I need to develop the native , Can i use existing backend java code for Android/IOS/Windows platform or do i need to make modifications in that ?
If yes will these modification vary per platform i.e. Android/IOS?
For User interface, i believe i need to develop altogether separate views. Is that correct ? If yes will there be separate views for android and IOS ?
If your backend java code is sitting on a server behind some sort of API (REST etc.) then it can be used by both applications.
If you are developing natively for both platforms then you will need separate views. There are however solutions for developing for both platforms using a single codebase see: Xamarin Cordova

GUI with Web-based languages

I'm wondering about develop Android and deskopt apps using Web-based languages for the GUI.
I mean, tool like Adobe Air/PhoneGap use HTML and CSS for the GUI and Javascript for the service-side.
Can I use Java for service-side and HTML+CSS for the GUI?
I experienced with develop Android and desktop app using Java (Eclipse) and Adobe Air for desktop app using HTML+CSS. Is there a way/tool to put together all these?
The focus is: Java for service-side, HTML+CSS for GUI, target: Android/desktop app.
Thank you
Yes, you can use Java for server-side and HTML+CSS for client-side.
You can read more here (Official Oracle Blog post about this topic with source code)

Same Sencha app for web and mobile

Query is : I have a current web application in place to provide me data in a list which is built using java and ui is built using jsp. I want to design a mobile app in Sencha to perform the same task and simultaneously want it in desktop using Sencha/ExtJs.
Now I am confused in following manner :
Do I need to create separate applications for web app and mobile app?
For the web app I need to load a separate set of files whereas for the mobile app it is different. If the application is one then can I do this?
Also, all the java files which I am using for the getting the list data, should be in same code base or separate?
Thanks in advance.
Sencha is a mobile app development framework based on HTML5 and query. So the controls and views are basically designed for mobile screens. But it does not stop you to display the same content on normal desktop browsers. Although what looks great on mobile may not look that good on a browser and vice versa.
Do I need to create separate applications for web app and mobile app?
Not really, everything can be same, views middleware and even backend. If you can design a UI that may look both on mobile and desktop then you are good.
For the web app I need to load a separate set of files whereas for the
mobile app it is different. If the application is one then can I do
this?
As I said above, except UI nothing should be a concern. If you want different look and feel for web and mobile then just create different HTML files for the said purposes. But you can use the same backend logic.
Also, all the java files which I am using for the getting the list
data, should be in same code base or separate?
Generally dynamic web applications fetches the data from backend servers using ajax/http service calls. You may manage the code in a single project or can divide it in logically smaller projects for better management. Maven should be a good choice to manage your projects.

Categories

Resources