2013-11-16

Android download manager

I needed to download files from the Internet.
Therefore I Googled the "Android download manager" and found the following example:
http://www.mysamplecode.com/2012/09/android-downloadmanager-example.html
I copied them into a new ADT DownloadManager project.
Some errors appeared:
    -import com.google.gson.Gson error

Some library was missing.
Again, googled Jason and downloaded google-gson-2.2.2-release,
and included it in the Java Build Path Library of DownloadManager Project.
Rebuilt project. Error showed:
    -DownloadManager.Request API level error, minimum 9

I changed android:minSdkVersion from 8 to 9 in the AandriodManifest.xml file.
And clicked "Debug As". More error on this point:
-request.setDestinationInExternalFilesDir error, Unable to create external files directory - ANDROID

I started Android Virtual Device Manager and set SD Card Size to 100 MB, restarted simulator.
No more errors!

a start point of a new Android development project

This is a start point of a new Android development project.
I just got a new Android machine with LAN and RS232 port.
Now I need to install the Android development environment.
First, I downloaded the ADT (Android Development Tools) from Google Site:
    http://developer.android.com/tools/sdk/eclipse-adt.html
And put it into one directory on my PC.
Double clicked the eclipse.exe under the "adt dir\eclips" directory, then I started a new Android project as follows:

-Click Eclipse.
-File>New>Project>...Select Android>Android Project, click Next.
-Key in HelloWorld, and Next, Next, Next, Next, Finish.
-Right Click HelloWorld>Run As>Android Application.
-Click Yes.
-Click New.
-Select Device.
-Key In AVD Name, then click OK.

I could see it was running!
The simulator was launched!
The app was running.