Skip to content


voice command example using proximity sensor, voice recognizer and TTS in android

In this example we will combine some features of android like proximity sensor, voice recognizer and TTS.

Proximity Sensor: is sensor that can recognize presence of nearby object. we will user this sensor to start voice recognition. So when you take you android device near to your face, proximity sensor will start the voice recognizer.

Voice Recognizer: can convert speech to text. So when you give the voice command, its will return an array of matches and will start TTS.

TTS(Text To Speech): can convert text speech. In this application we will use TTS to listen voice command response.
Continue reading “voice command example using proximity sensor, voice recognizer and TTS in android” »

Posted in Android.

Tagged with .


What is intent filter in android?

In my previous post, What is Intent in android? I have disused about intents. In that post we have seen that there are two types of intents.
1. Explicit intents: We can call target component by its name.
2. implicit intents: We can call a target component on the basis of what we want to perform.

In this post we will see, how does implicit intent work?
According to google intent filter is “To inform the system which implicit intents they can handle”

e.g. you have more that one activities in your application and you know that there is no “main” method in android application. So how activity launcher will know that which activity to start first.
Continue reading “What is intent filter in android?” »

Posted in Android.

Tagged with .


Custom Annotation in Android

For definition of java annotation i can’t think a better definition than wikipedia “An annotation, in the Java computer programming language, is a special form of syntactic metadata that can be added to Java source code. Classes, methods, variables, parameters and packages may be annotated. Unlike Javadoc tags, Java annotations can be reflective in that they can be embedded in class files generated by the compiler and may be retained by the Java VM to be made retrievable at run-time.” http://en.wikipedia.org/wiki/Java_annotation Some of  the java programmers use annotations without even know about annotations. When ever you override any method of super class in you class, eclipse automatically adds the @override annotation above method name.
Continue reading “Custom Annotation in Android” »

Posted in Android.

Tagged with .


Prompt user to enable location providers in Android

Now a days almost every smartphone applications use location based functionalities. But every articles say that disable wifi, 3g, gps etc for battery saving. So for every location based applications lots of problems are there like. What are location providers available in device? You can enable GPS using some method but best methods is ask user to enable location providers.
In this post we will see that how can we prompt user to enable location providers.
Continue reading “Prompt user to enable location providers in Android” »

Posted in Android.

Tagged with .


EditText in Android

You are developing game apps, business apps or any app you need EditText widget for taking input from users. Android EditText widget is functionally rich and customizable.I have worked on many platforms and i have noticed that on most of the platforms you have do lots of coding for UI customization. But in android you can easily customize UI elements as per your requirements. In this post i am trying to collect most of the information about android EditText. EditText is the subclass of TextView class.
Like other widgets you can add a simple EditText

Continue reading “EditText in Android” »

Posted in Android.

Tagged with .


What is Intent in android?

According to google “an Intent object, is a passive data structure holding an abstract description of an operation to be performed”.
intent is a very powerful concept. I have seen following advantages of intents.
1. It loosely couples your application.
2. It can activate three core components of the android applications activities, services, and broadcast receivers.
3. Using intents you can start any other activity that is installed in the system.
e.g. you can start address book application and you can get contacts from address.
4. Using intents you can expose your applications activity for other applications.
e.g. You can register your own “Send SMS by myApp” application for sending SMS.
Continue reading “What is Intent in android?” »

Posted in Android.

Tagged with .


Getting Started With Android

Google Android is an open source platform that includes Linux Kernal based operating system and SDK for mobile or tablet PC application development. When “Android SDK release 1″ came in 21 October 2008, lots of mobile platforms were already available for mobile application developers. But because of its familiar java programming support and open source platform it became popular very soon in smartphone application development.
At the time of writing this post, current version of android is 2.3.3 (Gingerbread) for smartphones and Android 3.0 (Honeycomb) for tablet PCs.
Continue reading “Getting Started With Android” »

Posted in Android.

Tagged with .


Switch from one screen to another in BlackBerry

whenever you start developing UI application on any platform, after learning some basic controls you have some basic questions like “How to switch from one screen to another?”, “How to send data from one screen to another?”.
In this post i am going to make a simple blackberry application in which i will add two numbers on one screen and i will display result on second screen. For UI applications i think “AddTwoNumbers” is also a “hello world” like program.
Continue reading “Switch from one screen to another in BlackBerry” »

Posted in Blackberry RIM.

Tagged with .


Implement HotKey in BlackBerry

hotkeys are keyboard shortcuts for menu options e.g. using alt+f you can open file menu option. Although blackberry trackballs are very smooth for navigation, we can implement hotkeys in blackberry application also. Because in mobile applications we should minimize the number of key presses.

In this screen shot you can see a list with some options. So if you want to select “About” option without hotkeys, you have to scroll down to the “About” and press.
Continue reading “Implement HotKey in BlackBerry” »

Posted in Blackberry RIM.


Native apps vs Web Apps vs Hybrid Apps

Native Apps: In mobile native apps are very common. Native apps mean applications that are written specifically for type of mobile devices. Native apps can take advantage of mobile phone’s functionalities. Native apps can be downloaded and installed. Main disadvantage of native app is if you want to develop same application for different smartphones like iphone, android, blackberry, etc., you have to write apps in different languages in different platforms. For blackberry and android you can take little benefit of java but iphone is completely different it uses objective c.

 

Pros of native apps:

1. You can take advantage of hardware features of devices.

2. You can sell your application on app stores.

3. User can download and install your app.

Cons of native apps:

1. You have to use different platforms, SDK’s, languages for different mobile platforms.

2. You have to pay to become iphone or android or blackberry developer.

3. You have to maintan different builds for different mobile platforms so maintenance, debugging will be slow.

 


Continue reading “Native apps vs Web Apps vs Hybrid Apps” »

Posted in Web Apps.

Tagged with , , , .