Android GPS Using. How to get current location example

Hi. Here i want show you how to use Android GPS quickly. This is simple, may be not perfect example how to get current location by GPS.
To use GPS in your application first of all you must specify the uses-permission in Android manifest file:

If you don’t set this permission the application can’t get access to location service.

To use this application with android emulator you must mock location data. To do this using Eclipse you must:

  • Select Window > Show View > Other > Emulator Control
  • In Emulator Control panel enter the GPS coordinates under Location Controls and press Send

This operation you must do every time then you Run application.

Below you can see the application activity ( source. Below you can download the source code of this Android project.
For more information about Android GPS Usage look HERE

Example of streaming mp3 mediafile from URL with Android MediaPlayer class

Few days ago i tried to make my Android app can play music from URL.

The Android API give to us a very useful class. Here i want show you how to make  the streaming m3 mediaplayer using MediaPlayer class from Android API. This app use Android 2.2.

Below you can see the UI of this app. It’s very simple. Also below you can get the link for downloading source code

Here i show you only Activity file (