Showing posts with label android. Show all posts
Showing posts with label android. Show all posts

Friday, February 7, 2014

Android Vibration Class Example Code

How do we vibrate android phone? How should we use vibration class? If you looking for this answers look at the following link. Download full source code and see how we do it!.

Read More

Monday, August 12, 2013

Flashlight Android Application

Hi guys, today I wanna tell about one of my experince on android app development. A couple of days ago, I wrote a Flashlight android app using docs in, I checked the app in two different phones:

  • first in a Motorola phone: my app worked perfect, it did its job. (turning on and turning off flash of the camera)
  • second in a Samsung SIII Mini: my app didn't work, it didn't do its job. (when I touched the 'open flash' button, flash couldn't open.)

So, I started to search the problem. There were a lot of statements in websites like that: "FLASH_MODE_TORCH doesn't work on samsung". I have used this parameter in my app too. I didn't believe that, because when I request possible parameters from eclipse by pressing Cntrl+Enter there was only one parameter which can open the flash: FLASH_MODE_TORCH. So, I thought there must be a missing code which requires in samsung phones and not needs in phones like Motorola. I continued to search and found a nice solution which says use "camera.startPreview()" after setting parameters of the camera. I used this in my app and it worked in samsung phones too.

The picture of my app are given in the following, and you can download it from the link below pic. I wrote the app just for an example, so its gui is really bad and simple.

If you like this article, use the share buttons below to help my blog.
If you have any question or need some help, leave a comment below.

Read More

Monday, July 22, 2013

Install Android SDK on Eclipse On Linux Distributions

To start developing Android apps we need to first choose an IDE platform or environment. I recommend Eclipse. It is really good and efficient to develop android apps. I will give the step by step installation of Eclipse and set up it to develop android apps.

Reqired Steps:

1. Open a terminal by typing Ctrl+F2
2. Type 'sudo apt-get install eclipse' enter, enter your password , this will install Eclipse platform.
3.  After installation open Eclipse from installed apps. When it is opening it will ask you workspace folder which is contains the application folders, choose or create as you want.

Now it is time to get Android SDK:

4. There are versions for linux distributions get the latest and convenient version for your system from:
The Android SDK is a compressed folder. Download and extract the contents of this
file to a convenient place on your computer. You should install the SDK where you usually put your
development tools. Open SDK file you will see a file as tools, in that file click android script and click run to run it. This will install Android SDK.

Both Eclipse and the Android SDK are installed. It's time to install the Eclipse plug-in
to take advantage of the Eclipse environment.

Obtaining and Installing the Eclipse plug-in

1. Run the "Find and Install" feature in Eclipse, found under the Help >Software Updates menu.
2. Select the Search for new features to install option.
3. Select New Remote Site. Give this site a name, such as "Android Developer Tools," for example. Use the following URL in the dialog: Please note the HTTPS in the URL. This is a secure download.

4. A new entry is added to the list and is checked by default. Click Finish. The search results display the Android Developer Tools. Select the Developer Tools and click Next.
5. After reviewing and accepting the license agreement, click Next. Note that the license agreement includes a special requirement for use of the Google Maps API.
6. Review and accept the installation location, then click Finish.

The plug-in is now downloaded and installed. The plug-in is not signed (at the time
of writing), so proceed at your own comfort level by clicking on Install All, then
restart Eclipse.

If you have any question, or need some help, leave a comment below.
Read More

Friday, July 19, 2013

Android x86 Wifi-Wireless Problem

Hi guys! Nowadays most of the people have a trouble with Android x86 wifi-wireless problem.
To handle this I figured out a solution.
If you haven't tried Android on a pc, you may  wanna see my post about how to install android on pc.

Open Android  and press Ctrl+Alt+F1 to open terminal then type the following rows:

netcfg        --to see what you have as connection devices in your computer
                    probably you see lo,eth0 and maybe eth1--
then type
netcfg eth0 up   --to open eth0-- after that type
netcfg setprop net.dns1
close the terminal by pressing Ctrl+Alt+F7

And have fun with your net connection.
This solution is worked for a friend. Maybe it will work for you too!.

Read More

Tuesday, March 26, 2013

How to install Android x86 on Pc

To install Android x86 on Pc: first download the iso file which is must be convenient with your pc. You can download it from here. After that you need to write it into a usb disk to form a livecd. Then reboot your computer. Go to boots by pressing F12 then select usb disk. You see the install menu will open. I recommend first try it with “Run Android x86 without installation” . Android will open. If it is not open that means that distribution or version is not convenient with your pc. Change the distribution or version and try it again. If it opened and if it works correctly. That means you can install Android x86 on your pc. Reboot your pc again do the same thing(F12 select usb disk). This time install it on your pc. And have a fun with Android.
If you have wifi-wireless problem after installation read that article for solution.
Thanks to google..  :)
Read More