Titanium iOS app to Android - android

I built an iOS app for a company i know, now I'm trying to make that same app for android. Just clicking the "Android" button in the xml file doesn't work. Do I have to rewrite the whole app again or is there some other way I can easily make that same app for android?

No, You don't need to rewrite the whole code again. But you should have to make some platform specific codes. Also some controls like Toolbar will not be available for Android. You can check the platform using Ti.Platform.osname or getOsname() method, which will return the osname(android/ios). In short, all other code will be work in android platform also.

Related

File upload field not working inside a web view in android

I have a webapplication made in Laravel Framework. I am launching it inside the web view of an android application. All works well but when i press the choose file It does no work. Its completely inactive. How to make it work?
I think you make use of the input attribute in your html, don't you?
As written here (FAQ part) it does not work out-of-the-box in webviews by now.
Maybe you can give the WebChromeClient.onShowFileChooser a shot (added API 21).

is it possible to create an android 1.5.1 app using Android Studio?

is it possible to create an Android 1.5.1 app using Android Studio?
Yes it is old but still used...
It only has to read 3 different txt files which are located on local network, containing 1 line of text each and display it under each other in portrait view.
Refresh ones a minute should be ok.
And it has to have a dropdown menu so you can choose which number of device it is, so from 1-10 is ok and according that read the txt files which belongs to that device nr.
I can't use a webpage because i cannot create a local server for it. So i need a little app.
To create the txt files i use a windows program.
I use Livecode (since short) but it can't create apps below Android froyo 2.2.
Any help on this would be highly appreciated. As i don't know anything about java.
It's only for local use, nothing commercial or anything
Thanks for any help on this!
You should try using PhoneGap (Cordova) http://phonegap.com which is basically a HTML-Webview, wrapped up in an App, so you can code the whole thing using JavaScript, and it is still a real app.
With this it should be very easy to do that, even if you "don't speak Java".
But to answer your initial question, yes it should be possible to create an Android App for 1.5.1 with Android Studio. You just need to install the right SDK/Packages etc with the SDK Manager.
Have fun coding.

Phonegap autogenerates code for new platform?

I am a new bee to phonegap and want to clarify some doubts .
I have heard that phone gap allows you to code for one platform and then code for all platforms can be created(or reused ) via some commands and then one just needs to do some tweeking around for new platform added .
However i see that when i created my app for android and then i called cordova platform add ios command , the code for ios was not auto generated or the same code could not be be reutilised . ie for me now i had to code again .
Question : Was i wrong to assume that this can be done ? can it be done and if yes what are the steps for auto-generating code for a newer platform .
If i have to create code for new platform say ios again from scratch i don't know what benefit does phonegap provides me . ?
Phonegap doesnt generate the code for you. I mean, you code in javascript, html and css and you use this code throughout the different platforms. Sometimes, you have to modify it because the calls to internal functionalities can change. But PhoneGap is not a code generator, is not a cross compiler, it´s just a wrapper which embeds your code in a webview and by using the cordova tools, you can generate the skeletons, for every platform, but it wont generate code for you automatically, the code is the one you have made in HTML5. You can take your www folder from iOS and put in in the android skeleton you have created and try it. Sometimes it works from the beginning...and some times, which are the most of the cases, you have to do some fixes to polish the code. Hope it helps

Custom Android MMS/SMS application from source code?

Okay here's the deal:
I want to download the full source of the MMS/SMS application that ships with Android phones. I want to be able to modify it, and add a little custom functionality to it.
I am developing using Eclipse, and I'm on Windows 7. I have noticed that there is now a Git for Windows, but I am pretty lost in it and not sure how to integrate everything with Eclipse.
Basically, I want to just get it to the point where I have all the source code visible in Eclipse and be able to see the app run JUST like the built-in texting/MMS app that is already on my phone. Then I'll know that I can modify it and proceed.
Any ideas?
Thanks!
There's a mirror of the SMS/MMS app on GitHub here. Just import that to Eclipse and customise away.
Unless you want to customize and use it only on your own phone (without publishing), this is not a good idea. This is because it uses classes that are hidden from the sdk. By default you won't even be able to build the apk via eclipse, but there is a way. The reason why this is a bad idea is that the hidden apis are not guaranteed to remain the same through different api-levels and your app can stop working with the next android update, and might also not work on previous api-levels. In-fact your app might not even work on selected phones running the same api-level.

Is it possible to configure an Android install to run a single app?

Is it possible to configure the Android OS to run only a single app?
Basically what I want to do is customize an Android device so that it boots up and runs one application only, and for that application to be switched to the front of the screen automatically. Also, when it gets closed, to be started up and switched to again. Any ideas?
Thanks,
-David
One method is to get the source of Android and write your own custom ROM of Android as Octavian wrote.
Another alternative would be to write a custom home app that, well, isn't really a home app (but replaces the default home app intent). See SlideScreen as an example of a non-traditional "home" app.
Yes it is possible. You have to fetch yourself the source codes for Android and basically create a custom ROM. After applying all desired modifications you bake your ROM and install it to your device.
Pretty much all you need to know about the source and the process of compiling the sources are located at Android Sources. You can view the source codes from your browser by following this link.
Hope it helps you a bit. Good luck.

Categories

Resources