Which Android API to use? - android-2.2-froyo

I'm planning on developing Android Apps. I downloaded the SDK and AVD manager, and about to download the SDK platforms.
My question is, I want to develop apps for 2.x platform. Do I need to download API 7-10? Which one to target?
Also, if you have tips regarding this, please mention them. Thank you.

It is not necessary to download all the platforms, just download the latest SDK and make your application compatible with other SDK.
For that you just need to define android:minSDKVersion and android:maxSDKVersion, android:targetSDKVersion.
<uses-sdk android:maxSdkVersion="12"
android:minSdkVersion="8">
</uses-sdk>
Here is a detailed article on "Compatibility" in "Best Practices" section at Android Developer site.

In short
For 2.1 you have to download API level 7
For 2.2 you have to download API level 8
For 2.3 you have following choices to download API levels
2.3 - 2.3.2 -- API level 9
2.3.3 - 2.3.7 -- API level 10
For seeing API levels and Android OS versions you must see :API Levels
I recommend you to go through Platform Versions atleast once before you start building any android application.

Related

ZXing.Net.Mobile update crash on Android

I need help with ZXing.Net.Mobile component (barcode scanning library).
The latest versions produce a runtime error for Galaxy Ace 2 (API 10) device, not only in my application, but also in the sample included with the library.
I would like to know if this is a bug or just API limitation.
Tested version: 2.0.4.17. You can try sample.
Thanks.
This was an API limitation. As you can see on this link the ZXing Scanner version was incompatible with some devices.
Fortunately, its creator solved it and he launched a new version compatible with Android 2.3.

Can I create an app for Google Play Store in C++?

I need to know whether I can create an app for Google Play Store in C++, or whether I have to use Java.
I don't have a JDK, so if I can use C++, then that would make things easier and cheaper.
You can look at the Qt library at http://www.qt.io/
From the Tools and Versions page for the latest version (5.5) it states:
Android NDK r10c r10c r10c
Android SDK r24.0.2 r24.0.2 r24.0.2
And in the Play Store there are a few Qt example applications:
Introduction to Qt 5
Qt 5 Everywhere
You can download an open source version of Qt from here
There are also some steps on the Getting Started with Qt for Android documents page.
PS:
I have not attempted to use Qt for Mobile (Android, Win Phone, iPhone) development but I am planning to test this sometime this year.
Edit: I see you do need the Android SDK, NDK and Java JDK but at least you don't need to code in Java if that helps.
Thank you everyone for you quick replies!
Based on your answers, it looks like it's time to give me laptop new life so I can use pure Java.
Thanks again!

Explicitly set base SDK to 3.2 to catch compiler errors

We're building an iPad app and don't plan to use any APIs that are not available in iOS 3.2. Our deployment target is already set to 3.2, but I would like to set our base SDK to 3.2 so that we get compiler warnings/errors if we accidentally invoke APIs not available in 3.2, rather than runtime failures.
Is this a good idea? If so, is the 3.2 sdk still available for download, and will older sdks work with newer XCode versions, like 4? Thanks.
There's no guarantee Xcode will support older SDK versions but as an example the current install of Xcode 4 goes all the way back to 3.0. I would drop 3.2 if I were you (few iPad users are on that; most iOS apps enforce 4.X in the App Store so I'd bet most people have upgraded) but if you are going to support it perhaps you should consider using conditional code for different OS' versions.

Does Mac App Store accept application written in Python/Java/Ruby?

Does Mac App Store accept application written in Python/Java/Ruby?
The Good News
Yes, you can submit a Java app to the Mac App Store. Not true in the past, but it is true at least as of now in 2013.
One example is the successful MoneyDance personal finance app currently available for sale in the Mac App Store.
The Bad News
Preparing and submitting your app is neither simple nor easy. You have to jump through some hoops.
Your app cannot depend on Java being installed on the Mac. You must include a JRE (Java Runtime Environment) within your Mac app.
You must write a thin Objective-C wrapper around your Java app. The source code and examples/tutorials are available on the web.
Like any other app, you must go through all hassle of the complicated build and deployment rigmarole with security restrictions Apple requires of any Mac App Store app.
More Info
Two articles, Take your Java application to the Mac App Store and Forking the OpenJDK for fun and profit, by Marco Dinacci. These articles may provide other useful information, but fortunately their discussion of forking the JDK is now outmoded. He and others have provided the needed patches now incorporated in the official releases.
How to Create a Mac OS X Installer for a Java Application (Updated for Mac OS X 10.8 — Mountain Lion) by Dem Pilafian of Center Key Software.
Packaging a Java App for Distribution on a Mac (Oracle)
Submitting to the Mac App Store (Apple)
By the way, you can use both Swing and JavaFX in your app. JavaFX is now bundled with Java, at least as of Java 7 Update 40 according to these Release Notes.
Java 9
The newly released Java 9 should make this process of wrapping an app with a runtime even easier and better.
Modules
Java 9 brings “modularization”, Java Platform Module System (JPMS), where the approximately 5,000 classes bundled with a JVM are grouped into about a hundred chunks known as modules. You can include only the modules containing classes actually used by your particular app rather hauling along every library. If you don't use JSON or CORBA, then you need not include the JSON or CORBA related modules.
The new jlink tool does this work for you, to assemble and optimize a set of modules and their dependencies into a custom run-time image. As a bonus, some link-time optimization work is performed to make your app launch faster.
These features are supported on 64-bit macOS systems, along with other platforms.
Native compiling
Java 9 also brings new support for native compiling, to build an app optimized for specific hardware. But this ability is experimental, and not yet ready for production use.
Update, as of 2018
Oracle has announced the end of web deployment technology, including Java Web Start, the previously recommended avenue for desktop apps. So now, Oracle expects all Java apps to be delivered bundled with a JVM such as is done with the jlink tool mentioned above.
So, the process of wrapping an app with a Java runtime that was something of a rarity just for the Apple App Store is now mainstream. Oracle expects any Java-based desktop app to be installed this way.
Yes and no. Apple doesn't care what language your App is written in, but it cannot depend on or install anything outside of the binary you submit to Apple. The relevant guidelines are below:
2.14
Apps must be packaged and submitted using Apple's packaging technologies included in Xcode - no third party installers allowed
2.15
Apps must be self-contained, single application installation bundles, and cannot install code or resources in shared locations
2.16
Apps that download or install additional code or resources to add functionality or change their primary purpose will be rejected
So, while this means you can't depend on Ruby or Python, you could use a framework like MacRuby to build your app in Ruby and embed the Ruby interpreter. Speaking for MacRuby, apps have been successfully submitted to the Mac App Store this way.
Ruby ? Yes !
Apple already accepted one of my apps written in MacRuby.
AFAIK, Cocoa will allow you include code written in different languages (including Ruby and Python, but not Java I don't think).
Check the Apple SDK's for more info, but I believe (thanks to Cocoa) it's not a problem.
For Python apps, I wrote a comprehensive article explaining how to build and submit such apps to the Mac App Store. It includes source code and build scripts for a barebones example app that I have successfully submitted.
Submitting a Python App to the Mac App Store
Possibly Java, if you bundle the Java application into a mac application.

Debug for iOS 3.x in xcode with SDK 4.1

I've downloaded the latest SDK from developer.apple.com and can only pick 3.2 or 4.1 from Project > Properties > Base SDK.
My iPhone is 4.1
My client have iPhone 3.x
You feel the problem...
How can I debug for iOS 3.x in xcode with the 4.1 SDK installed?
Actually that's a very frequent question (was lazy, only linked one).
Short version: you need to set your Base SDK to the highest SDK version you've got and your project's Deployment Target to the lowest version you like to support, e.g. 3.0. This means, the Deployment Target specifies the oldest version your app should be able to run on. But beware, this setting does not prevent you from accidentially calling, say, methods available since 4.0 on an 3.0 iPhone and thus causing a method missing exception.
This isn't possible have I come to understand.
You have to buy a old iPhone 3.x.
If you want my opinion on this, then I think this is horrible, frustrating and completely not understandable.

Resources