Google Sites is a free and easy way to create and share webpages.
For more information please visit https://sites.google.com/?pli=1
This Blog is introduce to help Tanzania community get to know more about Android Technology, it help developers to start develop android mobile apps and also the community will know more about the benefit of using Mobile Phone that support android Technology
Friday, July 5, 2013
Friday, June 28, 2013
Android's Text to Speech Tutorial
This
is a sample activity which shows How to use Android’s Text to Speech
capabilities. Text to Speech was introduced in Android 1.6, so when you create
your new Android project make sure your minimum required SDK is set to Android
1.6 (or API level 4).
Basic
description of algorithm in step by step form:
1.)
Create a Project TextToSpeech.
2.)
Put the following code snippet in res/layout/main.xml:
<?xml version="1.0" encoding="utf-8"?>
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<EditText android:id="@+id/input_text"
android:text=""
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<Button android:id="@+id/speak_button"
android:text="Speak to me"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
Steps to Create:
1.)
Open Eclipse. Use the New Project Wizard and select Android Project Give the
respective project name i.e. MyTextToSpeech. Enter following information:
Project
name: TextToSpeech
Build
Target: Android APIs 2.2
Application
name: TextToSpeech
Package
name: com.app.texttopeech
Create
Activity: TextToSpeech
Put the
following code in src/com.app.texttopeech/TextToSpeech
package com.app.TextToSpeech;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.speech.tts.TextToSpeech;
import android.speech.tts.TextToSpeech.OnInitListener;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class TextToSpeech
extends Activity implements OnInitListener{
/** Called when the activity is first created. */
private int MY_DATA_CHECK_CODE
= 0;
private TextToSpeech tts;
private EditText inputText;
private Button speakButton;
@Override
public void onCreate(Bundle
savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
inputText = (EditText) findViewById(R.id.input_text);
speakButton = (Button) findViewById(R.id.speak_button);
speakButton.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View
v) {
String text = inputText.getText().toString();
if (text!=null &&
text.length()>0) {
Toast.makeText(MyTextToSpeech.this, "Saying: " +
text, Toast.LENGTH_LONG).show();
tts.speak(text, TextToSpeech.QUEUE_ADD, null);
}
}
});
Intent checkIntent = new Intent();
checkIntent.setAction(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA);
startActivityForResult(checkIntent, MY_DATA_CHECK_CODE);
}
protected void onActivityResult(int requestCode,
int resultCode, Intent data) {
if (requestCode ==
MY_DATA_CHECK_CODE) {
if (resultCode ==
TextToSpeech.Engine.CHECK_VOICE_DATA_PASS) {
// success, create the TTS instance
tts = new TextToSpeech(this,
this);
}
else {
// missing data, install it
Intent installIntent = new Intent();
installIntent.setAction(TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA);
startActivity(installIntent);
}
}
}
@Override
public void onInit(int status)
{
if (status == TextToSpeech.SUCCESS)
{
Toast.makeText(MyTextToSpeech.this, "Text-To-Speech engine
is initialized", Toast.LENGTH_LONG).show();
}
else if (status
== TextToSpeech.ERROR) {
Toast.makeText(MyTextToSpeech.this, "Error occurred while
initializing Text-To-Speech engine", Toast.LENGTH_LONG).show();
}
}
}
Run the Application
Output –The final output:
Wednesday, June 26, 2013
Tanzania-MIT Tele-Hackathon July 15th-16th, 2013 in Dar es Salaam, Tanzania; and USA
Please sign up to get your ticket to attend this historical event.
https://www.hackerleague.org/hackathons/tanzania-mit-tele-hackathon
https://www.hackerleague.org/hackathons/tanzania-mit-tele-hackathon
Friday, June 14, 2013
Running Your App - BYFAA
If you followed the previous lesson to create an Android project, it includes a default set of "Hello World" source files that allow you to immediately run the app.
Before you run your app, you should be aware of a few directories and files in the Android project:
AndroidManifest.xml- The manifest file describes the fundamental characteristics of the app and defines each of its components. You'll learn about various declarations in this file as you read more training classes.
src/- Directory for your app's main source files. By default, it includes an
Activityclass that runs when your app is launched using the app icon. res/- Contains several sub-directories for app resources. Here are just a few:
drawable-hdpi/- Directory for drawable objects (such as bitmaps) that are designed for high-density (hdpi) screens. Other drawable directories contain assets designed for other screen densities.
layout/- Directory for files that define your app's user interface.
values/- Directory for other various XML files that contain a collection of resources, such as string and color definitions.
Run on the Emulator
Whether you're using Eclipse or the command line, to run your app on the emulator you need to first create anAndroid Virtual Device (AVD). An AVD is a device configuration for the Android emulator that allows you to model different devices.Figure 1. The AVD Manager showing a few virtual devices.To create an AVD:- Launch the Android Virtual Device Manager:
- In Eclipse, click Android Virtual Device Manager
from the toolbar.
- From the command line, change directories to
<sdk>/tools/and execute:android avd
- In Eclipse, click Android Virtual Device Manager
- In the Android Virtual Device Manager panel, click New.
- Fill in the details for the AVD. Give it a name, a platform target, an SD card size, and a skin (HVGA is default).
- Click Create AVD.
- Select the new AVD from the Android Virtual Device Manager and click Start.
- After the emulator boots up, unlock the emulator screen.
To run the app from Eclipse:- Open one of your project's files and click Run
from the toolbar.
- In the Run as window that appears, select Android Application and click OK.
Eclipse installs the app on your AVD and starts it.Get ready for the next tutorial which is very interesting- Launch the Android Virtual Device Manager:
Friday, June 7, 2013
Building Your First Android App (BYFAA)
Before you start this class, be sure you have your development environment set up. You need to:
- Download the Android SDK.
- Install the ADT plugin for Eclipse (if you’ll use the Eclipse IDE).
- Download the latest SDK tools and platforms using the SDK Manager.
If you haven't already done these tasks, start by downloading the Android Sdk from the link below http://developer.android.com/sdk/index.html
Once you've finished the setup, you're ready to begin this class.
This class uses a tutorial format that incrementally builds a small Android app that teaches you some fundamental concepts about Android development, so it's important that you follow each step.
First Step: Creating Android Project
An Android project contains all the files that comprise the source code for your Android app. The Android SDK tools make it easy to start a new Android project with a set of default project directories and files.
Note: You should already have the Android SDK installed, and if you're using Eclipse, you should also have the ADT plugininstalled (version 21.0.0 or higher). If you don't have these, follow the guide to Installing the Android SDK before you start this lesson.
1. Click New in the toolbar.
2. In the window that appears, open the Android folder, select Android Application Project, and click Next.
3. Fill in the form that appears:
Application Name: Is the app name that appears to users
Project Name: Is the name of your project directory
Package Name: Is the package namespace for your app
Leave the rest of detail then Click Next
4. On the next screen to configure the project, leave the default selection and Click Next
5. The next screen can help you create a launcher icon for your app. You can customize an icon in several ways and the tool generates an icon for all screen densities. Click Next
6. Now you can select an activity template from which to begin building you app. For this project, select BlackActivity and Click Next.
7. Leave all the details for the activity in their default state and click Finish.
Your Android project is now set up with some default files and you're ready to begin building the app.
Get ready for the next lesson of BYFAA.
Thursday, June 6, 2013
ANDROID QUIZ
Android phones, based on the mobile operating system from Google, have taken over the world. But there is more to Android than just a popular phone platform.
Android rule the world
The Android OS has appeared on wearable devices such as smart watches and Google Glass, as well as on Cameras and a book-shaped PC made of cardboard. The operating system is open source, so it could be show up almost anywhere.
Various phone makers have had a major part to play in the story of Android, with HTC and Sumsung leading the way at various times. Motorola Mobility, now owned by Google, is obviously going to have a key role in future.
Try out this quiz
http://www.techweekeurope.co.uk/quiz/android-86-1
Android rule the world
The Android OS has appeared on wearable devices such as smart watches and Google Glass, as well as on Cameras and a book-shaped PC made of cardboard. The operating system is open source, so it could be show up almost anywhere.
Various phone makers have had a major part to play in the story of Android, with HTC and Sumsung leading the way at various times. Motorola Mobility, now owned by Google, is obviously going to have a key role in future.
Try out this quiz
http://www.techweekeurope.co.uk/quiz/android-86-1
Samsung S4 Life companion
Make your life richer, simpler and more fun.
As a life companion, the new Samsung Galaxy S4 helps bring us closer and captures those fun moments when we are together. Each feature has been designed to simplify and enrich our daily lives and the phone is even smart enough to monitor our health and well-being. To put it simply, the Samsung Galaxy S4 is there for you.
Amazing feature - Group Play - Share Music
Share the enjoyment with friends.
Get your friends together and let them enjoy your music simultaneously. Wirelessly connect multiple Samsung Galaxy S4 phones to play games and share photos and documents. Get all Samsung Galaxy S4 phones together and create a powerful sound system that enhances the sound quality and keeps the party going.
Get your friends together and let them enjoy your music simultaneously. Wirelessly connect multiple Samsung Galaxy S4 phones to play games and share photos and documents. Get all Samsung Galaxy S4 phones together and create a powerful sound system that enhances the sound quality and keeps the party going.
Subscribe to:
Posts (Atom)


