android

Android application development

I read recently in a magazine that it's now possible to write / use Adobe-Air applications on android devices. I've been developing android applications for 3 months and find that it's sometimes tricky to get the desired results using android sdk. On the other hand I read that you can use html and javascript stuff in AIR applications. ...

how we can use Network_PROVIDER for location service Android?

Hi, My Device with SIM and Wifi connection.When I near to the accessble position of Wifi My program shows me correct Location by using gps service.When I go far from WiFi it gives me gps is not available and it doesn't take NETWORK_PROVIDER for displaying location.How can I make sure that to take Network_Provider if WiFi is unavailable?...

Broadcast Intent inside an Handler

Hi All, I have an handler in one activity, and I would like to use sendBroadcast in order to start receiver of another application(different APK). I cant do this since i am into an Handler and i`am losing the scope of my activity. Any idea how I could achieve this idea? some code: private Handler mHandler = new Handler() { publi...

Using images for multiple resolutions

Hello I was wondering if there is a way for using one set of images for all the resolutions. I have an application, and I want to port it on all the android resolutions but I don't want to store 3 sets of images, for every resolution category. What would be the best practice to use as less images as possible. Thank you! ...

SQLite Optimization for Android application

We have about 7-8 tables in our Android application each having about 8 columns on an average. Both read and write operations are performed on the database and I am experimenting and trying to find ways to enhance the performance of the DataAccess layer. So, far I have tried the following: Use positional arguments in where clauses (R...

maven support for android projects?

I want to start a project for Android but i really like to build it using Maven. Does Google provide support for Maven or plan to support it? It would be great if anybody know at least an archetype for Maven that I can use meanwhile. Thanks in advance. ...

Android: How to create a ContextMenu for a custom View

I'd like to show a ContextMenu for a custom View which is not part of an AdapterView. I called myActivity.registerForContextMenu(myView); and the ContextMenu already shows up. But I don't know how to access the data of myView in @Override onContextItemSelected(MenuItem item) //... I thought I could create a custom menuInfo in @...

Android Enable and Disable GPS

Hello guys, I'm a beginner android developer. I want enable and disable GPS with a click of a button, without running this intent: intente in = new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS); startActivity(in); that brings me in the setting menu. Is there a method to enable or disable GPS as in the androi...

How to distribute apk files to my friends ?

I have created a very small android app. I don't want to publish it to public. I just want my other friend to run my app on his phone. I don't have android phone but my friend has one. I have developed the app using eclipse IDE. How do I bundle it to apk and give it to him. I am a beginner (even less than a beginner) - please tell me wha...

Problem on insatlling apk on android device

hi everyone, i want to install a non market app on android device by using given steps: 1)Copy the APK file you want to install to your phone's memory card and insert the card into your Android phone. 2)Go to Android Market and search for the Apps Installer application. 3)Open it and click on the Install button. 4)After it is installed...

Android menu not displaying

My select_screen_menu.xml <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"&gt; <item android:id="@+id/home_menu" android:icon="@drawable/home_tab" android:title="Home" /> <item android:id="@+id/submit_report" android:icon="@drawable/submit_tab" androi...

Android TranslateAnimation with Button View problem

Hi guys, I'm trying to have fun with android animations. This is the crime scene: I've a relative layout with the following components: On the background we placed a ListView 200dip wide. Hover the ListView we added: one Button 40dip wide, 2nd ListView 80dip wide and a 3rd ListView 80dip wide. As first thing I would like to show the L...

Logcat printing "interface name: null" during each DefaultHttpClient execution method call

I am contacting a web service multiple times to get a JSON String via HttpGet and DefaultHttpClient. ... DefaultHttpClient defaultHttpClient = new DefaultHttpClient(); HttpGet httpGet = new HttpGet(url); HttpResponse httpResponse = (HttpResponse)defaultHttpClient.execute(httpGet); HttpEntity httpEntity = httpResponse.getEntity(); ... ...

Android Class Object problem

HI all, actually i m new in android development. i have one activity class and one simple class(Without Activity). in Simple class i m calling some web service and storing the response in array. after that this array i want to access in my activity class. m not able to make the object. how can i do that? i don't want to use bundle. as ...

Images in my Layout scale up but the should not. How can i prevent the Images to be scaled?

Hi! I have a RelativeLayout in wich i have two images. The problem is: the scale up. They are displayed way bigger than the are supposed to. Here is my layout: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/gallery_batch" android:layout_width="wrap_content" android:layout_height="wrap_content...

Filtering Array of Strings

Friend's I'm working upon searching in maps, here i have string in my array,when i enter characters for searching in Edit text box,i need the string have started with similar character in my result. for example in my array i have String[] name ={"A","B","BB","Boys","Box"} Initially i have all the array string in my result,if i ...

Vector graphics in Android

I'm working on an application that displays someone else's database of images. The images they have are all vector graphics and can be converted to any format, however keeping them in a vector format is good because users will probably want to zoom in closely. The question is, is there a built-in way to display a vector graphic in Andr...

video thumbnails not working

Hai friends I am trying to display thumbnail videos in my media player and it's not working. Log cat error is 10-25 19:50:35.577: ERROR/MediaPlayerService(33): error: -2 10-25 19:50:35.577: ERROR/MediaPlayer(65): Unable to to create media player 10-25 19:50:35.916: ERROR/AndroidRuntime(1175): FATAL EXCEPTION: main 10-25 19:50:35.916...

The method OpenFileOutput() is undefined !!!

firstly, I coded some methods in Main Activity, But I decided they should be a class. this is my code... openFileOutput and openFileInput are undefined. Any idea?? maybe it should be service or activity...?? package spexco.hus.system; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io....

[android] Preferred method for XML layouts: explicit attributes or styles.xml?

Currently I'm mixing explicit attributes (layout_width, height, alignment) on my various XML layouts with coded styles in styles.xml, plus outsourcing colors from colors.xml. From your experience, what's the recommended way to organize an android app's layouts? ...