Tag Archives: Android

Make screenshot with android and linux .

You need SDK from android website on your linux distro.

Power on your device tablet and you need to connect on your PC.

Enable debug mode on your tablet.

Go to shell linux and on platform-tools folder yoou use this command:

Star your application from tablet and under linux shell use the next command:

If you got some errors like : error: device offline

Just go and set tablet online or from settings set to stay online.

NOTE: if you use some terminal emulator android app then the command screenshot not working.
Use first $ adb shell and then try screenshot

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

Create splash screen application

This is a simple example about creating splash on android.

One problem with splash can increase the size of your application.

You can read more about splash screen here.

Let’s try the example.

I use NetBeans 2.7.1 to make one default application.

Also I created one image splash screen by copy one icon application to new folder drawable.

You can see the steps:

The folders and files created by NetBeans can be see with tree linux command.

If you using M3 version the you need to use id=”@+id.

Also you can got this error: Warning: found plain ‘id’ attribute; did you mean the new ‘android:id’ name? .

This is the source code I changed in main.xml file.

And the source code I changed in MainActivity.java file.

The application working well , I use my device to run it.

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

Debug your android application with your device.

First edit your Android manifest with:

Go to platform-tools.

Connect your device to computer via USB.

On your device set USB Debugging mode to enabled, do not activate USB Mass Storage Mode.

See the next commands:

So you need to be super user or root.

Now when you run netbeans ( I used with version 2.7.1) will be able to run your application using your device.

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

Android application using OpenStreet-Tools for Android.

This is an advance tutorial using java, android SDK and OpenStreetMap-Tools for Android.

OpenStreetMap is a free worldwide map, created by people like you.

You need to know java language programming.

You can use this feature to make your android app.

First you need IDE like Eclipse or Netbeans and set this IDE to working with android SDK.

The next step is to download the OpenStreetMap-Tools for Android from here.

Open the default project android in your IDE.

Your project must be use Android level 3 or higher.

All resources you need to be used by osmdroid are included in the jar.

Copy all jar files to libs folder.

Now I will show my app code source.

First change the content of the file AndroidManifest.xml with this:

In the folder /src/com/catafest/map/ make two files named: MainViewActivity.java and MyItemizedOverlay.java.

First file MainViewActivity.java has this source code.

The next source code of the file MyItemizedOverlay.java.

Compile your project and test it with your android device.

The result is show in the next screenshot image. The screenshot app I use don’t make an very good screenshot – see the colors.

android source code app

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

Create first android project using adt-bundle-linux-x86

If you make android aplications then in this tutorial you’ll learn how to create an Android project.

The easy way is to use adt bundle linux.

To use the adt bundle linux you need to install jre and jdk.

You can get from oracle website.

The ADT Bundle includes everything you need to begin developing apps.

You can get it from here.

Unarchive the zip file and go to the folder:

Open the eclipse folder and run the binary.

The first image it’s splash logo, see:

android adt splash logo

The next image show us the eclipse interface.

android adt eclipse 001

To make one project just go to: FileNew Project.

android adt eclipse 002

The wizard ask to select the type project.

This can be: from existing source code , sample project or new android project.

android adt eclipse 003

After you write the source code, just run the project.

The output will be run in android emulator.

Also you need to make settings for this emulator.

android adt emulator

I will come with more tutorials.

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