Use CreativeSDK below API level 14? - android

For some reason the original Aviary framework has stopped working and this has forced me to migrate our code to use the new CreativeSDK instead.
Unfortunately this new SDK has a minSdkVersion of 14 = Android 4.0, but a lot of our customers still use older versions (a little over 20 % according to Googles statistics for our app).
We cannot release an app update that cuts away that many users, but is there a way to compile the app with a lower api level and then just disable the image editing for the "old api" users?

is there a way to compile the app with a lower api level and then just disable the image editing for the "old api" users?
Tricky question. You can try build the app with api lv < 14 but then the creativeSDK will not be able to compile, resulting in a build error, so no.
Android 4.0 is already ~4 years old. It happens more and more that libraries drop support for older android versions (for good reason I think. Just update already!), as is the case with the creativeSDK. The minSDK requirement went from 2.3 in the aviary framework to 4.0 in the creativeSDK.
Adobe has to have done this for a reason. It is too much of a hassle to provide compatibility for 'old' versions of android, especially for complex functionality.
It is mentioned here, here and here that the creativeSDK now really requires api 14, and compatibility for older versions is not mentioned anywhere, meaning it very much likely doesn't exist.
To come back to your question, I think what would be a solution for you is to create multiple APKs for different API levels. There is some work to be done, but it is officially supported by Android, and the steps on how to achieve it are described clearly in the documentation I linked to.
Other than that, you have two options:
Drop the SDK and use another library.
Contact support and ask if they had forseen this issue and how they suggest you go about solving it.

As noted by Tim, the Adobe Creative SDK supports Android API 14 and up. It won't work for anything lower than that.
If you're using the Image Editor UI component, it's also worth noting that for APIs 14 and 15, the AviaryIntent.Builder will not work.
There is a workaround for that issue documented here.
Update: Note that starting in version 0.9.7 of the Creative SDK, the Image Editor supports Android API 16 and up only. This is noted in the Getting Started guide.

Related

How to determine versions of Android supported by my app

I am building an app using Android Studio version 2.1.
I am testing it on a Lollipop device and a marshmallow one.
I was suggested to use support libraries, and I would like to make sure that it runs smoothly on Jelly Bean devices too.
I have looked it up, but can't quite understand if using v4 o v7 guarantees Jelly Bean compatibility (I am assuming it does, but not sure).
This is the first app I am developing and I just realised that I mistakenly used support versions in some activities, and native in others. I am fixing that.
Is there any tool which analyses all the code and then determines the earliest Android version that can run my app? Possibly giving suggestions on changes to make the compatibility broader?
All the answers I found so far confused me, they possibly require knowledge I don't yet have. I am a Java developer quickly trying to put together an app for a start up.
The minVersion in your manifest or gradle file determines the minimum SDK version that can use it. If you lower that number, any API call that doesn't exist on that version will cause an error or warning. Fix them.
BTW, KitKat is 19. So to have KitKat as the minimum SDK you don't need to use any support versions most likely. The best reason to do so is that it will provide a more consistent interface going forward- fewer version specific oddities when using support versions.

What is the Minimum SDK and which one should I choose

First off, I know very little about android development, I am just getting started.
What is the Minimum SDK choice that you get when creating a project in android studio? Is there a downside to using an older one? And if I follow a tutorial is it essential that I use the same one so I can follow along?
Thanks.
What is the Minimum SDK choice that you get when creating a project in android studio?
That is the oldest version of Android that you are willing to support. It is expressed in terms of an API level. You can see common API levels in the Android dashboards, and the documentation will point out in many places where things need such-and-so an API level to work.
Is there a downside to using an older one?
Less stuff in Android will be supported. In your case, since you are following a tutorial, choosing a lower minSdkVersion may cause some more complaints from your IDE, saying that such-and-so is not available on your chosen minSdkVersion.
And if I follow a tutorial is it essential that I use the same one so I can follow along?
IMHO, that depends on your overall programming experience. If you are a veteran developer, and you want to play around with a lower minSdkVersion, go ahead, bearing in mind that the tutorial code might not run on that API level. If you are fairly new to programming overall, stick with what the tutorial tells you to do. If your concern is that your test device is not new enough for the tutorial, find a different tutorial, find a different device, or use the emulator instead of a device for testing this tutorial.
android:minSdkVersion
An integer designating the minimum API Level required for the application to run. The Android system will prevent the user from installing the application if the system's API Level is lower than the value specified in this attribute. You should always declare this attribute.
You can use your own min SDK but be careful about features you use. infact, minSDK with great number have more features.

Which support libraries should I use if my app has minimum skd = 21?

Firstly, let me say that the Android Support Libraries are still a bit intimidating to me. I'm no expert yet. A lot has been written about using them to get api>=21 features on pre-Lollipop devices, but what should I be using if my minSdkVersion is 21?
For example, consider Toolbar. Is there any reason why I shouldn't use the native version instead of support.v7.widget.Toolbar? It should work fine on all post-Lollipop devices. Or, if this is a naive assumption, is there a more recent support library that I should be using?
Most likely (though perhaps not right now) it would be good to use the support library version over the system version. The support libraries get features added to it as new Android versions come out. So, with the support library tools, you'll get features that are available for 21, 22, 23, and beyond. The support libraries will also automatically handle errors if those features are not possible with the certain version of Android (like with the new Permissions apis introduced in 23).
With the system versions, you'll have to check yourself if you're on 21, 22, 23 to use specific methods or functionality.
Now, at the same time, you may not particularly care about these future features. The Toolbar for example is very handy and capable as-is. If you write something using only the 21 APIs, then they (should) work for future Android versions.

Platform compatibility issue

Android platform sample codes and reference from the Android developer site is based on platform 1.5 I understand that newer platforms can support applications developed on older platforms but the reciprocal is not applicable which makes sense but is the coding different? Are codes that were used for developing 1.5 apps still useful in newer platforms or have newer classes and methods replaced them? It seems that eclipse is producing a lot of coding errors in its samples in relation to classes and methods also if a app that was developd by a IME is unable to be viewed on the emulator or how can it be tested or retrieved on the device? Any advice is welcome...sorry it's so long
If you look in the SDK folders, on windows it will be c:\<SDK location>\samples\android-x the samples are located according to api level so they will definitely be compatible there so I would look at these.
To answer your other questions, yes there are api changes as you go up an api level so they should cause warnings or compilation errors and some classes may even be completely removed. Generally the lower level stuff shouldn't change too much but the most important thing is that the semantics change rarely unless there was a design flaw in the original implementations.
The release notes for each version usually points out what has changed and the online documentation is generally superb in my opinion in informing you what exactly is deprecated. If you are just targeting old devices then your emulator is just set to target those api levels but if you are concerned about functionality then you could code using api 1.5 say, and run an ICS api level 15 emulator and check everything works OK, if not then you decide what the best strategy should be. Generally I would advise to target Android 2.2 and above for mobile devices and 3.0 for tablets but really it is up to you.
three are classes that are deprecated and can't be used anymore, like Contacts.People. There are also classes that are deprecated, they can still be used but they should be avoided in new projects. And there are new classes that were not available before. In some cases like for Fragment there are compatibility support libs to use the new features on the old platform but this is not true for classes like for example PreferenceFragment that are not supported on old platforms.

Is there a way to check the API compatibility of my app for lower levels?

I'm developing an Android app which will target 2.1/2.2 devices, so I have my project set up to use the 2.2 SDK (API level 8), but allow for installation on devices with at least API level 7.
The problem is that during my daily development, I'm not always paying close attention to which API level of the methods/classes/constants that I'm using, which makes it very easy to break code on older devices. I have got dynamic classloading working, and as much as I dislike having a ton of extra factory classes and interfaces in my project, I'm willing to deal with that solution. Currently, the only way I have to check an older API level is to set my project's settings to the given level, rebuild, see what breaks, and then refactor. It's quite a pain.
What I would really like is the ability to scan my code and check compatibility for a given API level without changing my global project build settings. Is there some easy way to do this?
Android API Analysis Plug-In for Eclipse:
http://adt-addons.googlecode.com/svn/trunk/apianalysis/
Ok, so based on my research and the comment by #CommonsWare, there's no static analysis tool or some other easy way to do this. Shucks.

Categories

Resources