I would like to test and distribute my phonegap app. It already runs for iPhone.
At first I installed the newest SDK (4.0.3) but this one does not run on my phone. So... i guess I have to install more.
What do I need to install in the Android SDK Manager?
All SDKs? Do I need the Sample/Arm/GoogleAPI/Sources too?
Generally I install all the SDK versions as it is good to be able to test on the various emulators to make sure you app works in all versions of Android. You should always build your application with the latest SDK but in your AndroidManifest.xml file you should have a android:minSdkVersion set to the lowest Android level you want your app to run on. For now I recommend 7 (Android 2.1) as 97% of the phones are running 2.1 or above.
As you can see in the platform versions chart here it is recommended to use Android 2.1 or 2.2 SDK to cover almost all the Android devices on the market.
I think you don't need Sample/ARM/Sources, though if you need to use Google proprietary API (for example Google Maps API) you need to use Google API versions of 2.1 or 2.2.
You only need the SDK that matches the API level you intend to build for.
This page: http://developer.android.com/resources/dashboard/platform-versions.html
has a breakdown of what devices are most active in currrent use (accessed market within 2 weeks)
Judging by that, if you target 2.1 you'd be able to install your app on 98.3% of all such devices.
It is generally best to pick the oldest platform that supports all of the features you need. Just stay at or above 1.6, that is when support for multiple screen sizes was introduced.
As I think, the best solution is SDK 2.2. Many devices work with this android version.
On your Android phone go to settings->About Phone and view the Android version. This should be the sdk you will need. Afterwords, you can just change the target android sdk version in your app and it should run on your phone. As for the folders you speak of - they contain some examples, the source code of the sdk and some additional apis to use google services. It is up to you whether you will need them. You will definitely need the platform-tools from the Android SDK manager - they provide you with the adb tool that enables you to upload applications to your device.
Related
The new version of SDK for Qt 5.12 doesn't include SDK Manager in the Tool folder, hence I needed Android Studio to Add/Remove the packages.
I know that APIs must be chosen based on the target and purposes. But since the APIs are new (28) and there are different options to download, it's rather puzzling what to download.
I don't have a real Android device nor want I use the Emulator. I merely wish to Build the program using Android kits and create APK files from them. Afterwards I will test those APK files on real Android devices which include new or middle aged smartphones and tablets.
For these purposes what packages should I install, for instance, what check boxes are needed to be checked here in the screenshot below. I will repeat the pattern for a number of lower APIs then.
If you don't want an emulator, then you don't want the "system images".
As for the API level, it really depends on what is the minimum API you want to target. If you download only the latest API, you significantly limit your targets, as the app will only run on the latest and greatest version of Android.
The safe lower limit seems to be API level 19, which is android 4.4. So you can use that to build your apps, and they will run on any version onward.
Additionally, if you want to publish to the market, you will have to set your target API to some of the latest versions, because google won't accept any older. Note that the "target SDK" is different from the "minimum required SDK", which you can still have at version 19.
There isn't much point in installing the latest SDK versions, as Qt isn't really using their features, I mean unless you are doing some Java native android app development.
The documentation for Qt 5.12 says "API 21", but 19 seems to work just fine, and it allows to target older devices that are stuck without OS updates - currently around 7-8% of active devices. Still, if you don't care about that, you should go with the recommended API version 21.
so I'm using QT to develop an app for Android, and according to Sophos Mobile Security this app is "Built for outdated Android versions: this app doesn't support recent android security features. the app was built for an older version of android"
in qt creator I have android-25 set as the android build sdk (which I wouldn't consider old after all, it's 7.1.1 nougat)
how can I make this warning go away? Is there a way to build my app for a newer version of android without excluding users from using it? (I have 7.1.1, and at least I want to use my app)
thank you for your response in advance.
EDIT:
seems like there are (at least?) 3 spots where I can set an SDK version:
minimum required sdk, as seen on the screenshot here: Qt for android: change the application icon
target SDK version, as seen on the screenshot above
this was the only one I was aware an hour ago: projects->build->build android apk->android build sdk
what they govern, how to set them? should they be the same or different?
Android suggests you use the latest sdk version for targetSdkVersion and for build-tools version (they have to match). In fact, Google Play now requires you to target at least SDK 26. This will not prevent older devices from running app. Actually it will be more problematic for newer devices, as you are stating that app has been fully tested and can run on newer devices, and does not need backward compatibility. See https://developer.android.com/distribute/best-practices/develop/target-sdk for more details.
As for minSdkVersion, that is what will determine the earliest devices supported, and you should try to keep it as low as you can, and as 95-99% of your users.
I just installed the android apk and adt plugin for eclipse. Further in the sdk manager , I've installed all the tools , Android 4.4.2(API 19) , Android 2.1(API 7) as well as the android support library and google USB driver. Now what i want to know about is , are these packages enough to start development or am i still missing everything ?
Further what i want to know is, if i want my app to be compatible with all android versions , do i need to install all versions of Android API ??
This should be enough.
No, you just need the newest SDK, set the build target to that API version and all lower versions will be supported. For keeping backwards-compatibility, you'll also have to make sure to use APIs that are supported on the lowest SDK version you want to support
Short answer: You only have to install the ones you want to develop for.
My advice in to install at least the 5 most common ones to be able to test your app against these version.
You probably want your app to be also available for users which didn't yet update to Android 4.4.2.
I'm new To android ecosystem.
Do I really need to install all the SDK from Android 1.5 to Android 4.1? to create an app which will support almost all the Android versions
No, one should be fine. Pick the latest one. So 4.1 be it!
Just set your apps mininum sdk version to the desired api level.
Eclipse should warn you if you use stuff that aint working on that minumum version.
Do I really need to install all the SDK from Android 1.5 to Android 4.1? to create an app which will support almost all the Android versions
You need to test your app on any version that you intend to support. For those Android versions that you have a physical device for, you can test your app on that (most likely). For anything else, you will at least need to download the emulator images, so you can create emulators for those older Android versions.
Recently I just discovered the HTC opensense SDK.
Will this SDK only work on HTC devices, or devices with HTC Sense installed, or will it work on other devices?
Link: http://www.htcdev.com/devcenter/opensense-sdk
Has anyone used this SDK before?
There's a showcase of some of the successful third party apps at the bottom of this page that use the SDK:
http://htcdev.com/devcenter/opensense-sdk
The functionality of the SDK only works on HTC devices in general, although sometimes a library is included to help aid development on emulators like with the Scribe active pen API. We do recommend that you write apps as a single APK that works on all devices, however, be they HTC or otherwise.
You can do this by targeting the SDK just like you would target a high version of Android, then checking using reflection or other methods when to use the extra functions. This is the same approach most developers use for supporting features only introduced in newer versions of Android. You can also have an Android library project that targets the SDK and a main project that targets something else if needed, and still produce a single APK.
You can see an example of the first technique in the samples directory of the add on. That's android-sdk\add-ons\addon-opensense_sdk_for_tablets-htc-12\samples where android-sdk is where you installed the SDK and you have the current OpenSense SDK installed from the Google SDK Manager. The sample project name for that is SingleApkDemo. The name of the add on will probably change in the next release but we'll still have samples in the directory.