1. How to make your application supports multiple languages?

You have to create language catalogs and files for the languages that you want to support in res catalog.
For example:

When users switch a certain language, your application
will automatically apply the corresponding language file.

(Default language)

res/values/strings.xml (Default language)
<?xml version="1.0" encoding="utf-8"?>
<resources>
     <string name="hello">Hello, MultiLanguage!</string>
     <string name="app_name">MultiLanguage</string>
</resources>

 

res/values-fr/strings.xml (French)


(French)

<?xml version="1.0" encoding="utf-8"?>
<resources>
     <string name="hello">Bonjour, Multilingue!</string>
     <string name="app_name">Multilingue</string>
</resources>

 

res/values-ja/strings.xml (Japanese)


(Japanese)

<?xml version="1.0" encoding="utf-8"?>
<resources>
     <string name="hello">こんにちは、多言語!</string>
     <string name="app_name">多言語</string>
</resources>

 

res/values-zh-rTW/strings.xml (Traditional Chinese)


(Traditional Chinese)

<?xml version="1.0" encoding="utf-8"?>
<resources>
     <string name="hello">你好、多國言語!</string>
     <string name="app_name">多國言語</string>
</resources>

 

2. How to interchange Android bitmap and drawable?

When it comes to image function in your application, the most common used feature is Android bitmap or drawable. Sometimes for the programming requirement, it needs to interchange bitmap and drawable. The ways of interchange are as follows.

  • Change from drawable to bitmap
    You can use canvas to change drawable to bitmap.
    Bitmap drawableToBitmap(Drawable drawable)
    {
    Bitmap.Config c =drawable.getOpacity() != PixelFormat.OPAQUE ?
    Bitmap.Config.ARGB_8888 : Bitmap.Config.RGB_565;
    Bitmap bitmap = Bitmap.createBitmap(
    drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), c);
    Canvas canvas = new Canvas(bitmap);
    drawable.setBounds(0, 0, drawable.getIntrinsicWidth(),
    drawable.getIntrinsicHeight());
    drawable.draw(canvas);
    return bitmap;
    }
  • Change from bitmap to drawable
    You can use BitmapDrawable to change bitmap to drawable.
    Drawable bitmapToDrawable(Bitmap bitmap)
    {
    Drawable drawable = new BitmapDrawable(bitmap);return drawable;
    }

 

3. How to increase user’s desire to purchase your applications?

In consumer behavior, exists the mechanism as below:


<Consumer behavior mechanism illustration>

Only when a seller’s applications meet a buyer’s requirements, the translation will be set. Therefore, a popular paid application should fulfill some requirements as below:

  1. Make sure that your application’s function fulfills consumer’s requirements. A way to do so is that you can check the apk in Camangi Markey by popularity for reference.
  2. Provide trial version for your application. It allows users have opportunity to try your applications before they purchase them and also increases user’s purchasing intention. Basically, you can provide basic function from full version as trial apk or limited the trial period.
  3. Optimize your application UI. UI is the first impression of your application, so a good UI usually attracts more users’ attention.
  4. Upgrade your applications from time to time. In that way, it may let users feel your commitment for the application.
  5. Listen to users feedbacks and communicate with them. Sometimes you can get real feedback from reviewers.

Developers can take the five points as their goal for developing a popular paid application.

 

4. How to debug your Android applications on an Android device or emulator?

Here are some requirements to do before you can start:

  1. In the AndroidManifest.xml file, add android:debuggable="true" to the application element.
    Example:
    <application android:name="@string/app_name" android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true" >

  2. Turn USB debugging on your device by doing Setting-->Applications-->Development.

Now, you may use the “debug mode” in eclipse to debug your Android applications.

 

5. How to create an emulator for Android Tablet?

  1. In Eclipse, select Window -> Android SDK and AVD Manager or under Android SDK / tools to run the android directly.
  2. Select Virtual Devices and click New button to open the dialog box (The illustration is as below).
  3. Type a name in Name blank and select the version of Android SDK in Target blank.
  4. Select the screen resolution in Skin/Built-in (the common resolution for a tablet can be WVGA 480 x 800 or WSVGA 600 x 1024 etc.).If there is no suitable option for you, you are free to enter a resolution value in Resolution blank.
  5. Select additional emulation options in Hardware blank, such as LCD dpi, keyboard support, ram size…
  6. Click Create AVD button. Now you can use the emulator to develop and test your applications.

 

6. Define your application version before publish it on Camangi Market.

Before publishing your application to Camangi Market, please make sure you have defined the following properties in the application's Manifest file.

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.package_name" android:versionCode="1" android:versionName="1.0"> . . . </manifest>

Property Description:

  1. Package : The java package name of an application is a unique identifier. Therefore, the java package name of your application is the way for Camangi Market to define your application. The property has to be unique, and it can not be repeated with other applications on Camangi Market. When you update your application on Camangi Market, please make sure the package name must be the same.
  2. Android : versionCode : An integer value that represents the version of the application is necessary since Camangi Market identify the integer value to determine the version of application and handling updates. When you update your application on Camangi Market, the integer value must to be increased.
  3. Android : versionName : A string value that represents the version of the application is necessary as Camangi Market will display the string value of your applications to users (the illustration as below). Here you can define desirable version for your applications (e.g. 1.1.1 or 0.1 beta…). When you update your application on Camangi Market, please must make sure to modify the string value as well.


An application’s version info illustration

 

7. How to modify my APK from mobile to tablet version easily?

Here we issue a frequent case might happen when we try to develop the apk without resolution problem.

Case: Unusual UI display may happen when an application runs on specific screen size and resolutions. Please see the illustration as below.


Unusual UI display illustration

Why? It might because the SDK version that you develop for your APK is Android 1.5 or older version. The Android 1.5 was designed for single screen size, and the resolution is HVGA 320x480 on 3.2" screen. However, the Android 1.6 and above is not in the case since Android 1.6 supports a range of screen sizes and resolutions for Android application development, which means it gives developers a little control over applications. With the variety screen sizes and resolutions, you just have to simply choose the desire screen size and resolution for your APK in other words your application will definitely fits the screen size with appropriate resolution you would likely to show.

How to do it?
Key Point: Upgrade your Android 1.5 to 1.6.

Steps:

  1. Go to Eclipse and right click your project.→PropertiesAndroidChange Android 1.5 to 1.6 in the Project Build Target.
  2. Modify the set up in the AndroidManifest.xml
    <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/>
    If necessary, specify the screen size in the <supports-screens>
  3. To re-build and test.

Notice: android:minSdkVersion="3" means the minimum requirement of SDK is 1.5, that is, you can still install the application on Android 1.5 devices. Of course, you have to ensure that your program code don’t have the API only support after Android 1.6 version or the API forbidden by Android 1.6.

 

8. How to upload your professional applications on Camangi Market?

  1. Please log in our Camangi Market
  2. Then go to My Account → My Sharing, and fill in this request form.
  3. Please refer to the picture as right side.