The TransCommu Android SDK allows apps to be translated by their users right from their devices. What this means, is that developers who integrate the SDK will allow their users to translate their software conveniently from the app itself.
The SDK is very easy to integrate and can be done in minutes with very little effort from the developer at all.
This guide assumes that the developer is using Eclipse and the Java programming language to develop their apps and that they have already downloaded and installed the Android Development Tools from the Android developers website.
The SDK natively supports applications targeting Android API level 11 (Android 3.0.x) through level 21 (Android 5.0). If your application targets a level outside of this range, it is strongly recommended that you test your project properly since those API levels are not guaranteed to work with TransCommu.
To get started, follow the steps to download and set up the SDK.
Now the coding starts.
Navigate to your project's "AndroidManifest.xml" file and paste the following XML inside of the
<activity android:name="com.yasesprox.android.transcommusdk.TransCommuActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"></activity> <activity android:name="com.yasesprox.android.transcommusdk.LoginActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"></activity> <activity android:name="com.yasesprox.android.transcommusdk.CreateAccountActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"></activity> <activity android:name="com.yasesprox.android.transcommusdk.TranslateActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"></activity>
Still in the "AndroidManifest.xml" file, paste the following XML inside of the
- Now decide a place somewhere in your app where the user can go exclusively to contribute to your app's translations. If your app has a "preferences" screen, this would be a perfect place to add an item to the screen called something along the lines "Help translate this app" that the user clicks on and the TransCommu services are launched.
To launch the TransCommu services, paste the following code into your click event in your activity (or wherever you wish to present your user with the translation tools).
Intent intent = new Intent(this, TransCommuActivity.class); intent.putExtra(TransCommuActivity.APPLICATION_CODE_EXTRA, "YOUR_APPLICATION_CODE"); this.startActivity(intent);
Log into your TransCommu account and visit the "My Applications" page. Copy the code of the application you are integrating the SDK for and paste it in the above Java code to replace the
- This is all you need to do. Launch your app and test it to make sure that everything is working properly.
The TransCommu Android SDK uses a set of activities to perform its operations. If you wish to customize the user experience, you can replace these activities by writing your own. You can still use some of the TransCommu activities if you decide not to replace them all.
To learn how to interact with these activities and their components, take a look at the full documentation for the TransCommu Android API's.
When customizing the user experience, you will have to get involved with the TransCommu Java SDK. On the "Download and Set Up" section you might have noticed the Java SDK jar was being added to your project.
To learn how to use the TransCommu Java SDK, visit the TransCommu Java SDK help page.