An approach to porting a project to another platform - android

I am an intern at a company trying to push an android and iPhone out out within the next 5 months. Today, I received information about my first "real" assignment which will entail porting the iPhone App to the Android platform. Here's my problem though: I've never seen a single line of Objective C code and I only just started programming in Java and for Android devices last wednesday.
So how do I go about porting an application? Where do I start? How do I best organize myself and get an overview of which tasks to complete and when to start working on them ?
tldr; How do I port an application to another platform?

Word porting means in effect creating an application on another platform (in another language if needed) that maintains the same functionality. As iOS and Android use different languages and internally very much different operating model, you cannot simply take iPhone code and translate it line-by-line into Android.
What you do need to do is analyse the functionality of the iPhone app and create an app for Android that will perform the same functionality. Do not approach this as a direct "porting" project, but rather as a new development project. You may be able to translate some business logic one-for-one - but anything related to the user interface (and, most likely, to any back-end server communication if you have any) will need to be written from scratch. You may encounter certain things that are present in an iPhone but are not supported at all in Android, or are very complicated to implement, so try to think how to substitute them with whatever Android does support.
The biggest problem you'll encounter with Android is the multitude of screen sizes and versions, each of which may behave differently and support different things. I suggest you start from the beginning and do one screen at a time, adding functionality step-by-step until you get the desired app.
5 months is a long enough period of time to complete the job for almost any app. Good luck!
P.S. I have gone through this exercise myself: having an iPhone app I had to "port" it to android platform. Using the approach I described, it took me about 2 months to complete the android app, which initially took about 3 months to create on an iPhone platform.

Related

Advice on the best way to go about developing an app for Android and iOS as first project

Sorry if the title wording is not clear enough. I need to deploy a very simple app on Android and iOS for a partner company (app does not need to be in App Store or Google Play) to control some machinery via bluetooth. Interface needs to be very basic and only contain a couple of buttons and some text labels that display some information (and be able to read a QR code).
We are not a mobile development company, thus I don't have any experience building apps like this, but the required functionality seems simple enough to at least look into what needs to be done.
Now, the problem is that I only know C/C++ and Python (moderate experience with the Qt framework) and am not really willing to learn both Java and Swift. I might consider learning Swift specifically for a simple project like this, seeing as iOS development is very much tied to their platform, but Java is out of the question. I've looked around and there seems to be a way to write both of them in Python and deploy to each platform, but something tells me it's not really worth the incredible amount of problems that could arise. I need your help with some advice on how to handle this project:
Can a cross-platform app be developed with python(or C/C++) and deployed to iOS and Android (thus halving the overall development time) whilst keeping a sufficiently tidy aspect and bluetooth communication?
If not, can I develop an Android app using C/C++ or Python without immense hurdles? I'd prefer Qt as i'm already familiar with the framework, but i suppose anything does it.
When developing an Android app under point 2, is it possible to see how the app looks like without installing it on the phone for every change in code?
Sorry if the post is too long, am really curios how difficult would a task like this be. I dont want to waste my time learning 2 new languages for just this project nor do i want to end up delaying the partner company with beginner problems caused by my scarce knowledge of a new language.
I really wouldn't suggest cross platform for this kind of project. The bluetooth stacks and APIs are going to be tremendously different, minimizing ability to code share. The UI stacks are completely different. Really using anything but the native tools on iOS can be particularly tricky. Python in particular is hard, because its not meant to interact with either platform. C would be easier, as both Java (via JNI) and Swift (via objective C to C bridges) can call C code. However the UI layers of the two are so different that it would only be useful for business logic, I would still recommend writing the UI in the native platforms.
If you were going to try and do cross platform, I'd suggest react native and javascript, merely because it's the most mature of the cross platform products. That said, their bluetooth stack is likely non-existant or poorly developed because its not the type of thing used by many of the type of apps that choose react native, so you'll likely have to dive into the deep end and learn how to make modules.
Given that this is going to be a company specific app not on an app store- do you actually need to support both OSes? Or can it be done on company devices of a single type? Pushing back on that product requirement might be your best bet.

Asp.NET Apple Android Windows8 phone GUI

I am thinking of developing a program within ASP.NET. But that I could port easily to Apple, Android and Windows phones and tablets. I also want the program to be able to run on PCs (MACĀ“s?).
This seems to be fine. However, the normal GUI of Windows does not look at all like the GUI from e.g. iOS or Android. And this would be a big show stopper. It should be at least optimized for touch mode. So all on screen widgets should be a bit bigger.
Are there libraries, providing controls, which looks like normal ones on the operating system? It would be best if this works kind of automatically. So the program should find out where it runs and load the standard GUI best fitting to the device, where it is being started.
I could of course develop own controls, but this may be a bit too much of effort.
It would also be very nice if the library would handle different screens or modes like portrait and landscape. So that it may switch depending on the orientation of the tablet, or phone for instance.
I am searching for something like that, which provides a good result, without the programmer needing too much to do by himself.
I also like if one can recommend a library he is using already by a bigger program. From my own experience, you get to know the strengh and weakness of such libraries with the time passing by.
Best Regards.
I already discovered some tools like PhoneGap, Sencha, Mono. I do not know, if these are well suited for me.
I like to create an app most likely for all plattforms at the same time. Is this the case with e.g. PhoneGap?
I am not familar with JavaScript, or CSS or HTML development.
I am an experienced C# programmer and I am quite familar with Java. So VisualStudio is my daily working environment, and I am using Eclipse also a lot.
Mono:
I only read about it and found out this aspects:
cost 999$ to use it in Visual Studio. Hope that this price includes development for all plattforms and not just one. Did not yet check this.
The coding looks very good.
There are APIs for Android, iOS, and Windows Phone to setup controls. So these parts needs to be rewritten for any supported application. One may create a core library, which can be used for all components. This aspect is not so nice.
However, I would prefer a solution, where the GUI is even described on another level. And then it should be brought to the current plattform automatically, if not specific libraries are used. So HTML5 may be more flexible.
Best Regards,
Patrick

How well does Unity 3d work for both Android and iPhone?

I'm not sure if this is the best place to ask this question so if it isn't please let me know and I will move it. I am looking to create a game for both Android and iPhone platform. I know Unity is a great game engine and my question is how well does it work for creating one code base to build for both Android and iPhone platforms? Time is a constraint on this project so I am very interested in how smoothly the process usually is when trying to build both applications and how much custom code must be written for each specific application. Any insite that people have on this topic would be much appreciated thanks.
Unity, as implied by it's very name, is designed explicitly to facilitate such multi-platform development in little time. You can for example define for each platform what the max size of each texture is, and it will automatically resize them for you when you build for that target platform - the build process really simple too. Since both your platforms are touch devices, it should be easy to have just one code base working seamlessly for both platforms (and more if needed), with very few custom code for each platform.
Unity has a no-questions-asked 30 day trial of the Android and (I think) iOS versions - I encourage you to try them and see for yourself how little time it will take you to have a proof of concept build for both platforms.

Actionscript 3 for Android - is there a mobile ready list view control available in Flash Builder 4.5 using Actionscript Mobile project

I am developing a mobile app in Flash Builder 4.5 based on an Actionscrip Mobile Project - i.e. no flex just pure actionscript.
Is there a listView component that I can use from a pure actionscript project (i.e. a list of items where each item has a picture and some text and you can flick the list up and down with your finger and select an item to proceed to the next screen) ?
After much searching I just don't seem to be able to find one but because it seems like this sort of thing must be available in a platform for developing mobile apps I can only assume I have missed something obvious. I think there is something like this in a Flex library (?) but I am not sure how to access it or if I even can/should from a pure actionscript project.
(After much searching I sat down and wrote one myself and it seems to work fine and replicates the 'real' thing quite nicely for my purposes. However I am assuming that someone else will have done it better and so would like to find the real thing if I can).
There are a few AS3 libraries available that you may want to check out:
MadComponents: http://madskool.wordpress.com/ & http://code.google.com/p/mad-components/
I'm testing the MadComponents library right now and it looks promising. Super easy to get up and running. Lacking on the documentation, but I suspect that will change soon as I've been talking with the creator.
AS3Flobile: http://custardbelly.com/blog/category/as3flobile/ & https://github.com/bustardcelly/as3flobile
Looks really nice and I've made a quick test with it. It has another dependency in the AS3 Signals library. Its a bit more involved to get the basic shell of the program up and running and has limited skinning ability from what I gather.
HTH.
There are no built-in controls if you are building an actionscript mobile project. You have a large assortment of controls if you build a Flex-based AIR application however.

A non-programmers guide to programming

Okay so I am a very low level programmer and happy to admit it. I can write simple programs things like VB and python etc given the basic syntax. I want to write simple programs for android, for instance a calculator that handles feet and inches and a program that simply searches a database of products and tells me the details of them. Is there a simple solution where I can drag and drop some buttons and text boxes and execute code or do I have to learn the whole gui drawing code and start from scratch? If I do have to start from scratch is there a book out there that doesn't assume that I know any of the advanced coding techniques or do I have to learn the whole language and then learn the SDK? I want to be able to write a program quick and dirty, here are the variables here's the formula, do your thing...
Android App Inventor.
The problem with this approach is that you'll learn how to make apps in App Inventor, but not learn how to program Java nor how to program Android. It may be useful as a first stepping stone though, or if you really don't want to get your hands too dirty.
Android App Inventor can do exactly what you want. I've done something similar with it.
One month and a half ago, it took some of my students (and some other random people) about two weeks to get the initial invite (once they had put themselves on the general waiting list). Since the form for the waiting list is still in effect, I assume it will take around the same waiting time in your case, or may be even less.
A couple of caveats thought: You need an Android phone to run your 'Android App Inventor' App (it won't run in the emulator). Android App Inventor doesn't give you access to the generated code (they have no plans to, besides they're not using java for the generated code anyway). App Inventor won't let you publish on the Market (although, they do have plans to add that capability, for now if you want your friends to install your app, it can give you a QRcode for it, or give you the apk file to share with them).
While you're waiting for your invite, I'd suggest you try out Android Scripting
http://code.google.com/p/android-scripting/
Scan the QRcode on that page (it's not on the Market yet). Install the SL4A app. Once SL4A is running, press on the menu key > select 'Add' > select Python. Once that's running, I recommend you run the test.py to see what kind of GUI intents can be launched directly from your phone python shell. The SL4A project is still very much alpha quality, but I'd say it's worth playing around with (especially in Python, since Python seems to be currently the most mature scripting environment supported on there, it actually supports a zillion other scripting languages).
Another thing you can do, from the Market this time, is to download the 'AndroidShell Lite' app. run the app, press the 'Local Console' button, and play around with that. I suspect that AndroidShell is using a version of the SL4A, but unlike SLA4, it can not be run in the emulator, the code doesn't seem to be open source, it doesn't support python (only beanshell which is just as easy actually), but it has much better documentation at least. That's why I'm recommending that you try out both 'AndroidShell Lite' and SL4A. Each has different strengths.
I believe App Inventor is what you are looking for. It is not designed for complex apps but can be helpfull for simple apps.
https://www.google.com/accounts/ServiceLogin?service=youngandroid&passive=true&nui=1&continue=http://appinventor.googlelabs.com/ode/Ya.html&followup=http://appinventor.googlelabs.com/ode/Ya.html
regards.
I will suggest you do the following:
1. Improve your JAVA programming skill. Reading material: "Think In Java"
2. Improve basic Android programming skill: any entry level android book
Make sure when you go through the material,
do your best to design and implement some useful projects, and publish to the market if possible.

Categories

Resources