android

android Toast and View help

I am trying to create a Helper class to display Toasts in my android app, as follows. public class ToastHelper{ final static Toast toastAlert(String msg) { LayoutInflater inflater = LayoutInflater.from(Main.self.getApplicationContext()); View layout = inflater.inflate(R.layout.toast_layout, (ViewGroup) findViewById(R.id.toast_layout_...

Android: what does "setTextFilterEnabled" method do?

What does the setTextFilterEnabled() method do? ...

how to call context menu

I open my context menu like this: private OnClickListener optionsClickListener = new OnClickListener() { public void onClick( View v ) { registerForContextMenu( v ); openContextMenu( v ); } }; How can I call registerForContextMenu( v ); openContextMenu( v ); from inside my regular menu handler here: public boolea...

Is Android more reliable than AJAX for phone/server communication?

I have an application that needs to send messages, repeatedly to the server. I'm currently using AJAX from the phone's browser and it works fairly reliably, but, as with all things cell-phone, not 100%. I'm curious if using Android and opening a socket to the server would give me any additional reliability, or if it would suffer from th...

Android.mk file for Executable: accRuntimeTest

Hi, Can you please tell me where I can find the Android.mk file for Executable: accRuntimeTest? I am getting the following error when I compile android source on ubuntu 9.10. I think it misses a linker flag to link a library 'dlsym', I just don't know where is the Android.mk file I should go and fix it? Install: out/target/product/gen...

Android claims that I have mispelled something in XML

I need to use various words but it seems that Android plays nanny and says that they are misspelled in XML. <string name="oiseau">oiseau</string> How do I override this function? TIA. ...

Android backround work scenario

Hello, this is the scenario: 1 user has a main activity used for ui. 2 programm needs to communicate with peers and keep connection and wait for messages 3 when a message comes it is shown in the main acivity. so the question is should I use a service for the communication and what type of service? and also should I use AsyncTask in ...

Consistent system bug while using UI test monkey app

Hi, I'm using the UI test monkey tool provided with android. This is a consistent error I see and wonder how I can avoid it. Somehow the test app will rotate the orientation of my app such that the emulator window is still in portrait orientation, but the screen surface is in a landscape orientation. When in this configuration, any tim...

android calendar

ComponentName componentName = new ComponentName("com.android.calendar", "com.android.calendar.LaunchActivity"); if (componentName != null) { Intent intent = new Intent(android.content.Intent.ACTION_VIEW); // com.android.providers.calendar.CalendarProvider intent.setFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK);...

android eclipse plugin can't find valid paths

I just installed the latest galileo eclipse release. I added the latest adt plugin and configured it to use my android sdk (r4). Unfortunately, the eclipse plugin is wiggin out. for some reason, it can't find(execute?) the android tools. I get this error on the eclipse project: Error executing aapt. Please check aapt is present at ~...

Android SMS receiver not working

I'm trying to write a simple application that attempts to receive SMS messages and handle them. I've followed several tutorials but I'm getting nowhere, when I send a SMS to the emulator, the Intent never seems to get fired. Here is my intent: package com.neocodenetworks.smsfwd; import android.content.*; import android.os.Bundle; impo...

Check if device has a camera?

Hi, In my app, I'd like to use the camera, if the device has one. Are there any devices running android that dont have a camera? By including the following into my manifest: <uses-feature android:name="android.hardware.camera" android:required="false"/> then it's basically saying "I'll use a camera if one exists, but don't need one t...

Android listview and lineralayout under one scrollbar

I want to create the following layout Section '1' is linear layout contains imageview and textview Section '2' is listview with customze items list I want to place both components under single verticle scrollbar, means i do not want scrollbar only for listview, currently i am achieving following layout through placing things in table...

Creating a custom control or making buttons inline

I have a need to create a control similar to UITabBar in iPhone, which is to be present on every activity of my application. UITabBar essentially is a battery of buttons exhibiting a TAB like behavior: every button maps to an activity. I have two solutions for this: 1. In the layout XML for every activity, I insert a <LinearLayout><Butto...

Android static object lifecycle (Application act crazy)

I am creating event search application, we set search criteria from one screen populate in another screen then user can edit search criteria from 3rd screen and goes to 4th screen. To achieve above task i am using static object which remember the values around the application and i don't need to do any thing extra. But i am afraid if a...

How to identify why android app crashed

When I are using Java we put System.out.println() for identifying errors, where it went wrong. A very naive method. With android, I cannot even use this method to isolate why the app crashed. With Rails we would read the log file. But as I am new to Java and android, I don't know which is the best practice. I believe there is a best ...

Android global variable

How can I create global variable keep remain values around the life cycle of the application regardless which activity running.. ...

How to create a tree view in Android?

There are no controls in Android that provide Tree-like View. There is an ExpandableList View which I suspect could be used to creating one. Have you tried imlpementing such a control? How would one implement such a control in Android? ...

Android Intent Save Path

Hey Guys At the moment I am using two intents. One for voice-recording, another for the camera: Intent photoIntent = new Intent("android.media.action.IMAGE_CAPTURE"); startActivityForResult(photoIntent, ACTIVITY_TAKE_PHOTO); Intent voiceIntent = new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION); startActivityForResult(voiceIntent...

android keyboard obscure edittext

In my application, when I click on an EditText view, the virtual keyboard obscures the view, so I can't see my edits. How can I resolves it programmatically ? ...