Tag Archives: Android

Droid@Screen – very fast android emulator .

You can download this utility from here.
Make sure you have Java setup on your machine and that the java executable is available in the PATH.
You also need to enable USB debugging on your device.
Let’s test it with this command:

Droid_Screen

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

Android geo google maps .

You need to take a look under this Google Maps Intents .
Start your project under Androi Studio or AIDE.
The source code will need to know come into this two files :
The AndroidManifest.XML file:
<?xml version=”1.0″ encoding=”utf-8″?>
<manifest xmlns:android=”http://schemas.android.com/apk/res/android”
package=”com.mycompany.myapp” >

<application
android:allowBackup=”true”
android:icon=”@drawable/ic_launcher”
android:label=”@string/app_name”
android:theme=”@style/AppTheme” >
<activity
android:name=”.MainActivity”
android:label=”@string/app_name” >
<intent-filter>
<action android:name=”android.intent.action.MAIN” />

<category android:name=”android.intent.category.LAUNCHER” />
</intent-filter>
</activity>
</application>

</manifest>
The MainActivity.JAVA file:
package com.mycompany.myapp;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;

public class MainActivity extends Activity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
i.setData(Uri.parse(“geo:54.5200,15.2500?z=1”));
startActivity(i);
}
}
The result it’s this screenshoot.
geo-google-maps-001

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

Android send mail with android mail setup.

I used AIDE development tool under my phone.
The main reason was : this IDE come with a simple default project.
The Android Studio can you give yourself a headache…
The AIDE will make all your files under your project.
I named my project MyAppMailSend with MainActivity.
So the java class will be MainActivity – public class MainActivity extends Activity.
Also I used Intent named ig .
Under XML files I need to put intent-filter and all @string , @drawable and @style.
The AndroidManifest.XML file :

<?xml version=”1.0″ encoding=”utf-8″?>
<manifest xmlns:android=”http://schemas.android.com/apk/res/android”
package=”com.mycompany.myapp” >

<application
android:allowBackup=”true”
android:icon=”@drawable/ic_launcher”
android:label=”@string/app_name”
android:theme=”@style/AppTheme” >
<activity
android:name=”.MainActivity”
android:label=”@string/app_name” >
<intent-filter>
<action android:name=”android.intent.action.MAIN” />

<category android:name=”android.intent.category.LAUNCHER” />
</intent-filter>
</activity>
</application>

</manifest>

Under this path MyAppMailSend\app\src\main\java\com\mycompany\myapp you wil have this file MainActivity.JAVA:

The \MyAppMailSend\app\src\main\res\layout\main.XML file:

<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”
android:layout_width=”match_parent”
android:layout_height=”match_parent”
android:gravity=”center”>

<TextView
android:text=”@string/hello_world”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content” />

</LinearLayout>

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

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 , , , .