android

Minimum memory for RAR decompression

What's the minimum memory needed to run a RAR decompression algorithm? I want to port a RAR decompression algorithm to mobiles (iPhone, Android and BlackBerry) and want to know if there's a bare minimum of memory needed before starting. I've heard that RAR decompression requires much more memory than ZIP decompression. ...

Android creating themes and styles

I would like to define a theme for my first Android app. I use Eclipse and I follow this tutorial but have problems. Steps: A. I create the values/styles.xml file with content <?xml version="1.0" encoding="utf-8"?> <resources> <style name="default_splashScreen"> <item name="android:background">@drawable/bg</item> </style> </r...

Limit to number of touches on Android?

I have a small test app on Android that is meant to test tracking multitouch input, but I am only ever getting two touches at the same time on my Evo. Does anyone know if this is a limitation to Android or the hardware? By the way, here's my test class so you can try it out yourself. import java.util.HashMap; import android.content.C...

with eclipse 3.5.2 - android sdk - where are the log files from a crash

I'm new to this android world and I'm finding that eclipse 3.5.2 is crashing constantly. There is no real rhyme or reason that I can see. Sometimes the crash occurs with the layout manager, sometimes when I try to search, other times when I attach a debugger. I thought that there might be log files that could help me track down the pr...

Android Secure Storage

I want to store some small but critical piece of information such as AES keys in my Android application. What would be the recommended way to do this? I do not want to hardcode keys as part of my application. I look at KeyStore but it does not really solve my problem. It can store my keys given that I can provide a password. Then I need...

With the android editText control is there a simple way to display only numbers?

I have a simple app that allows the user to push a button that brings up the list of contacts. They select the contact and the application then puts the phone number into an edit text control. This all works like a charm. However, I notice that the phone number that is retrieved has 'punctuation' marks in it: 123.456.7890 or 123-456...

python receiving from a socket

So I have a simple socket server on an android emulator. When I'm only sending data to it, it works just fine. But then if I want to echo that data back to the python script, it doesn't work at all. Here's the code that works: android: try { serverSocket = new ServerSocket(port); } catch (IOException e1) ...

Android XML Extracted from APK - Bad Encoding

Using DDMS I took a downloaded APK off my phone and unzipped it. The PNGs look great, but when I try to read the XMLs their encoding is such that none of my text editors can read it (Word, Notepad, Visual Studio etc) Is there something done to the XMLs in a APK that prevents us from reading them? ...

Customizing the More menu button icon

Hello to all, I was wondering if it is possible to customize the icon used for the More menu option (displayed when there are more than 6 menu options)? With the stock vanilla Android UI it appears as a disclosure-type arrow and on HTC Sense UI it's an ellipsis icon. Curious if these are fixed icons only defined in the Android resources...

Does /res/layout/main.xml describe a View or a ViewGroup?

My main.xml looks like this: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wr...

Identify Calling Application in Android NDK

I have a native android library (.so) I am bundling with some application. In the native code I want to verify the signer/package name of the calling application. The reason is, currently anyone can open up the .apk file take my .so file and use it to built their own applications. Is there a way to securely identify the calling applica...

Problem launching a MapActivity

Hi, My app force closes when I try to launch the same MapActivity from the HelloGoogleMaps tutorial. I am launching it from my main activity which is just a list: @Override protected void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); Intent i = new Intent(th...

What to do in custom ContentProvider's fillWindow() method?

I'm writing a custom ContentProvider that serves up content consisting of a single, constant string which I represent as a one-row table having columns _id = 0 and value = "SomeString". This string is not stored in a database, so I developed a subclass of CrossProcessCursor that has does everything required to behave like what I describ...

No code completion in XML code within fully qualified tag

Why does code within a fully qualified tag lack auto-completion in Eclipse? For example, within the following code (where the comment is) nothing I type is provided auto completion for member names / tag names. <android.gesture.GestureOverlayView android:id="@+id/gesturePage01" android:layout_width="fill_parent" android:layout...

Android SDK v6 Level 8 API icon

When I compile my app with Level 8 API and SDK 6, my app icon cannot not be found and the default android icon is shown instead. However, once I use level 4 API, i can see my icon on the screen. Does anyone know the solution? ...

Can we use android scripting environment for functional test automation?

Hi, I want to automate some of my functional test cases on android , can I use Android scripting environment and use Python / Perl to automate my functional test cases? Thanks AD ...

Android HTML form 'done' button sofkeyboard

I am opening a facebook login page in WebView when user select login field soft keyboard appears. I would like to have a done key button on the soft keyboard, how to do it? I know we can add the done button by the following code attached with edit field ediText.setImeOptions(EditorInfo.IME_ACTION_DONE); But it is HTML form in WebView...

How to check if my application is set default or not in android?

I want to check if my application is set as the default application for the Intents I'm handling inside my App. As an example ff more than one application supports to open a specified file format. I need to make my application as a default application from my code. How it possible to make my application a default (from the code)? Can a...

subclassing SurfaceView and overriding onDraw() to change SurfaceView parameters to generate preview of desired size

I have subclassed the SurfaceView and instantiating it in onCreate of the Activity. The preview is generated but the control never enters onDraw() which is overriden in the subclass of SurfaceView. Why is that? class ActivityClass extends Activity{ onCreate(){ mPreview = new Preview(this); setContentView(mPreview); } public void st...

Trouble triggering onKey event with Android.

I'm having difficulty getting my main View's onKey event to trigger. I'm not sure what I'm doing wrong, I have correctly implemented the onClick event but cannot seem to figure out the onKey event. Here's the relevant code: public class MyActivity extends Activity { private RelativeLayout main; private ApplicationToolbar toolb...