I have an application developed using Android 2.2 SDK. Can i port it on HTC Hero running Android 1.5?
Thanks
Dheepak
In theory yes, but you haven't given us enough information. Most of the API is largely the same so it may work simply by changing the "target" to whatever the 1.5 API level is. But it also may require hours upon hours of work if it relies heavily on API calls that are new to any version of Android after 1.5. It depends entirely on what the application does and how it does it.
We simply don't have enough information to give you an answer that is worth anything.
My suggestion would be to just change the compile target to Android 1.5 (I think the API level is 3...but I'm not sure) and see what happens. You can then go about fixing the errors that are reported. I would suggest looking through the errors though to make sure it isn't some fundamental problem with the calls you're using.
Related
I am a bit new to mobile development. I have been using my GS7 to debug the app I am creating and I have an add-on that requires API level 25. My phone is currently running version 24. Is it possible to change the API level of the device?
You can do it by updating the operative system on your phone. The problem is most of the phone manufacturers cook the OS to highlight flagship features and to create a unique user experience (in my opinion, is a bad strategy which causes more problems than the added value). Since the OS is coocked there might not be an upgrade for your phone.
Here is a table with the API level and the name of the OS.
The most common solution for this is to use an emulator. If you are working in Mac there would be no trouble on using the default emulator, but in Windows or Linux Genymotion is recommended.
To be clear, there is no such a thing as changing the API level on your Android phone by code from an app. You have to update the OS.
Sometimes using target API code can be solved by other means, making your app compatible with older devices. Sometimes is simply using another class, other times there is a compatibility class, and worst case scenario is using an if statement where you check the OS version.
If you need to test a feature that requires api 25, then you should probably do it on the emulator.
It's gotten really good. I do most of my work on it.
https://developer.android.com/studio/run/emulator.html
So, I'm current trying to learn and become a programmer. I've recently worked with C# but I really want to get into mobile apps, since most small projects really tend to fit better as mobile apps, rather than desktop apps.
The easiest, for me, seems to be the Android platform, but I'm having a problem... I don't own an android phone, but I could possibly purchase an old model. Naturally these will have an older version of Android, so here is my question...
How compatible are these different versions? Like, are there major differences when moving from Icecream Sandwich to Jelly Bean, or from KitKat to Lollipop?
How do app developers deal with this array of Android versions?
When you develop an app for an old version of Android, it will run without errors on all newer version of Android, unless you do something involving low-level stuff like direct kernel calls, but you will never encounter such issues if you only use Java.
Worst issue you'll see is your app visual style looking outdated on newer devices.
If you target API level 23 / Android 6.0 Marshmallow, you will still need to run your app on Android 6.0 emulator, to be sure that it won't crash when using new Android permission dialogs to ask for SD card access etc.
I've developed my first app and it worked fine on my phone (Android 2.2). When I tested in a Xoom (Android 3.2), it had lots of bugs, though. I need this app to run in many different versions of Android. How can I develop it and make sure it will, having only an Android 2.2 in hands for tests?
Developing with the last version targeted in the manifest while keeping a close eye to back compatibility is how you achieve this with the best efficiency.
Many libraries (ActionBar Sherlock, NotificationCompat2, ....) will help you in making your app back compatible without issues.
I strongly recommend making the app for the last version of Android so it is ready when this version gets some steam instead of targeting whatever version is the most popular right now. It is a bit more work at the beginning, but it will save you many headaches later on.
The emulator will help you test this, the best configuration is to have a terminal with the last version of android at your disposal (this is why the nexus are a very good choice for a dev) and different configurations on the emulator to test back compatibility or other form factors.
Android version 2.3 - 2.3.2 (API 9) are declared as obsolete, and according to Android Market statistics, are very rare (0.5% of market users).
The question is:
Why is API 9 declared obsolete and more importantly, is there any reason why should I not use it? I've been using API 9 and see no problems with it... am I missing something?
Better not fix it if it's not broken, right?
EDIT:
Clarification:
If I would update my applications' API from 9 to 10, what would be the benefits?
I can only see negative effects:
1% of users will suddenly find out that the app doesn't work on their phones any longer. This is even worse with paid apps. Or that I'd be forced to maintain two versions of each app.
Have a look at the description of API levels. Gingerbread API (9) has been replaced by Gingerbread MR1 (10). You should upgrade to this API.
The current version of the android OS is 4.0 (Ice Cream Sandwich). 2.3/2.3.2 is quite a few versions ago and was quickly replaced by 2.3.3. (api lvl 10), so it is very reasonable (as time progresses and changes / updates are introduced) to "shelve" a specific version so to speak.
However, the one strength in the android OS is backwards compatibility. While older devices (pre 2.3) will not be able to run your applications, all applications going forward will. There is technically no problem running the older OS's but bug fixes/changes...etc mean you may be inadvertently using buggy code that contains security flaws or other issues.
It's best to pick the API version that will reach the majority of your target market most effectively.
For example, if you wanted to take advantage of some screaming new OpenGL features on the newer higher powered phone you wouldn't want to run it an older API level and possibly create a storm of angry users because their phone doesn't have the HP to run it!
However a more simple application might be fine just running on an older OS (like the Chuck Norris random fact generator).
You should always go for the lowest possible API to use. Simply because the lower your API level is, the more users can you reach.
So looking at the current stats, you are able to reach 97.9% if you "dumb" yourself down to API level 7.
But why API level 9 is obsolete? One could not know for sure, but most likely because it had some major flaws.
The Lvl9 is obsolete because if you want to develop for Gingerbread you should use 2.3.3+ (Lvl 10). This is because the "old Gingerbread" (lvl 9) has some significant issues.
Well, I don't really think you should be worry about the OS itself. But many Droid programers, like myself, are not testing Gingerbread version on emulators. Mostly, because it's not showing on the SDK interface (appears only when you check the obsolete filter). So, I guess that other programers are ignoring this version also. That's the only problem I can think.
I have been developing for Android 2.2+ for the majority of the year. But when I look at the "List of Android Devices" on wikipedia, I see a substantial number of Android 2.1 devices. A lot of these may have never received OTA updates and some were released not that long ago. I've seen the readily available statistics about Android 2.2 being the most widely used, but I can't help feel like I'm cutting a big audience out.
I've seen a few differences between 2.1 and 2.2 (like with TabWidgets) but if I just dropped my SDK down to 2.1 what differences should I be aware of?
Is this even less relevant now, thoughts and experience welcome, or links to informative sources
As always, it depends on the specific features of your application. I don't want to talk you out of supporting 2.1. I'm certainly not an expert. But you have to weight how much work it is to make your application available to the last 20% percent of the market.
Although I like the idea of maintaining a lot of backward compatibility, I think it makes sense to support the "current and future market" more than spending a lot of effort to support older devices. Of course, if your application works well with older API levels that's great and you should obviously set it as such. Who knows, maybe adding support for 2.1 will take you less time than it took me to type this. :)
You can see up-to-date stats directly on the Android Platform Versions website.
I think the more interesting graph is the 2nd one that shows "number of Android devices that accessed Android Market" recently. (current one inlined here). So if you support 2.2 it looks like you're supporting over 75% of the market (and that number is only going to grow).
One other thing to watch out for is performance. In addition to features the pre-8 API doesn't support, older devices sometimes just don't have the performance of the newer ones. (Not always the case since there are dozens of devices.) One test device I used didn't support Live Wallpapers, not because of the API, but because the device just didn't have enough horsepower.
I'd definitely target 2.1 to get the largest audience.
The changes you have to be aware of are not huge, but can definitely stick you if you don't catch them.
A couple of things:
showDialog(int) can't take a Bundle as an argument in 2.l. The 2.2 call is: showDialog(int, Bundle)
You use a different function to access the SD card (also note that the SD card paths are different in 2.1 and 2.2)
I suggest using the android dev's reference pages feature of filtering by version. It'll make coding for 2.1 much easier.
http://developer.android.com/sdk/android-2.2.html
Personally I think you should just use the lowest you can support without damaging your functionality, features or UX.