Tag Archives: Android

Android Studio – tools and features – part 007

If you try to update your old Android Studio to Android Studio 1.2 RC 2 you may got this error:
The following SDK components were not installed: …
Most commons errors are for this components:
extra-android-m2repository,tools,addon-google_apis-google-21,android-21,sys-img-x86-addon-google_apis-google-21,source-21,extra-google-m2repository…
After this error the process of installation it’s stopped running.
To fix this you need to take a look to this path : …\AppData\Local\Android\sdk1
Start the : SDK Manager.exe application to update all your SDK components…
…or try to run android.bat command from tools folder : tools\android.bat update sdk –no-ui
After that the installation / update of Android Studio will be like in the next images.
android
android2
Then make all settings
android3

Posted in All, Android, Programming. Tagged with , , , , .

Android Studio – tools and features – part 006

You can quickly filter through commands by using the Find Actions shortcut.
That can be show you with : Ctrl+Shift+A keys and you will see the next dialog like into the next picture.
android-adb-key

Posted in All, Android, Programming. Tagged with , , , .

Android calendar application example – part 1.

This is a simple example about using widget calendar under Andoid OS.
Can be easy to do it if you know the basic of the programming.
First you need to make one application ( I use Android Studio – version 0.5.1).
Let’s see my example:
My application use:
the class is :
public class MainActivity extends ActionBarActivity
the project is set with this :
com.example.calendar.app
the widget is : CalendarView
I make this changes into this source files :

  • MainActivity,java
  • AndroidManifest.xml
  • activity_main.xml
  • main.xml
  • strings.xml

Let’s see the source code for this files:
The result working well. Also you can see in this picture the calendar result …

MainActivity.java



AndroidManifest.xml



activity_main.xml



main.xml



strings.xml



The result working well. Also you can see in this picture the calendar result …


android_calendar_001

Posted in All, Android, Programming, Windows 8. Tagged with , , , .

Android Studio – tools and features – part 005

Most of us have one old project. When we want to import this project into new Android Studio with a new SDK then will got one error.
In the next picture will see the steps to fix your new Android SDK.
android-tips-001
This will allow you to fix your Android SDK with the new one.

Posted in All, Android, Programming. Tagged with , , , .

Android gps application example – part 1.

This is a simple example about gps under Android OS.

I make this tutorial few days ago.

It’s easy and simple to do that. Is like any project under Android OS.

I use Android Studio but you can use Eclipse also…

Anter you open the new project you need to use the next source code.

Using Android Studio can be hard if you don’t know how this IDE link java source code.

So , your project will be named : SimpleLocation and main activity will be like this :

public class LocationActivity extends Activity implements LocationListener

First the LocationActivity.java file:

Also you can make two projects to see the diff and you will understand well how is working this …

…and AndroidManifest.xml :

finally the last file main.xml:

The GPS and A-GPS is something different so read all specification about your hardware device.

Finally the result will be something like this.

Posted in All, Android, Programming, Windows 8. Tagged with , , , , .