android

How to I tell my own custom Spinner Layout to use my Theme?

How to I tell my own custom Spinner Layout to use my Theme? Style: <style name="SpinnerText" parent="@android:style/Widget.TextView.SpinnerItem"> <item name="android:textAppearance">@style/AnswerTextElement</item> <item name="android:gravity">center_vertical|center_horizontal</item> </style> Theme: <style name="ApplicationTheme...

HTC Sense UI / Sprint on HTC Evo

Hey. Longtime lurker, first time poster. I just got a HTC Evo 4G from Google i/o. Its a great device, but I don't like how Sprint and HTC got replaced all of the native apps that were added on after 2.0 such as Gallery. The Gallery app on the phone uses flickr and facebook connect. I want to sync my Picasa albums. How can i get put the...

Providing a background service for other apps

I'm new to Android development and I couldn't find this in the Dev Guide. I would like to create a background service so that any other app could connect to it and get some data from it. I saw android.app.Service, but it seems that it only allows other apps to ping the service, it doesn't allow them to register for some specific events....

Why the service does not work?

The AlertDialog can show normally, but why the music service does not start? package com.commonware.android.AnalogClock; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.media.*; public class AlarmAlert extends...

Android 2.1 address bar causes change in viewport dimensions

Hi, I have a page that has a 100% width and height div in it (all surrounding elements are sized accordingly so that it does actually achieve 100% width and height). Below that div I have a second div with a fixed height. In mobile safari and blackberry everything is fine, when the page loads the dimensions are applied correctly (the t...

How to program for Android

Possible Duplicate: Where to start to learn Android? what language does it use? iphone is objective c what is android? what are some good sites for beginners? ...

How to know device/emulator layout (landscape/portrait) is changed

I am using two xml layout file layoutPotrait.xml and layoutLandscape.xml.When device/emulator is in portrait mode i want to set the content view with layoutPortrait.xml file and when I will change the emulator to landscape mode I want to set content view with layoutLandscape.xml file. How can I achieve this? ...

How to use onSensorChanged sensor data in combination with OpenGL

I have written a TestSuite to find out how to calculate the rotation angles from the data you get in SensorEventListener.onSensorChanged(). I really hope you can complete my solution to help people who will have the same problems like me. Here is the code, i think you will understand it after reading it. Feel free to change it, the main...

OutOfMemoryError what to increase and how?

I have a really long collection with 10k items, and when running a toString() on the object it crashes. I need to use this output somehow. 05-21 12:59:44.586: ERROR/dalvikvm-heap(6415): Out of memory on a 847610-byte allocation. 05-21 12:59:44.636: ERROR/dalvikvm(6415): Out of memory: Heap Size=15559KB, Allocated=12932KB, Bitmap Size=61...

Retractable button bar using animations

I want to create a button bar that is retractable: when the user clicks on a special "handle" button, the button bar should slide out of view partially so only the handle remains visible. When the bar is in retracted state only the handle is visible. Clicking on the handle should "slide out" the button bar so it is completely visible ag...

EGL initialized failed

Hello Everybody, I used a SurfaceView and EGL to render my 3D contents. When I press BACK and return my activity, the activity's 3D objects become to white. The reason is when the original activity(3D activity) resume, EGL would initialize again. So EGL would initialize and destroy everytime when different activities switch. I am no...

How do i stop the android garbage collector? Is it possible?

Is there any way to stop the garbage collector for some time? ...

Finding app version number in code.

Is there a simple way to find the current version of my application from with it? I would like to add the version string to the about screen. ...

How to sign an APK with more than one certificate?

How do I sign an APK with more than one certificate, so that I can do this when I publish to the Android Market: Version 1.0 => Signed with Certificate A Version 2.0 => Signed with Certificate A & B Version 3.0 => Signed with Certificate B The Android Market does give me some hope but I am not sure what to make of it, when I upload w...

Android - Read PNG image without alpha and decode as ARGB_8888

I try to read an image from sdcard (in emulator) and then create a Bitmap image with the BitmapFactory.decodeByteArray method. I set the options: options.inPrefferedConfig = Bitmap.Config.ARGB_8888 options.inDither = false Then I extract the pixels into a ByteBuffer. ByteBuffer buffer = ByteBuffer.allocateDirect(width*heigh...

Protecting my apps security from a disassembler

So I recently tested deassembling one of my android apps, and to my horror I discovered that the code was quite readable. Even worse, all my variable names where intact! I thought that those would be compressed to something unreadable at compile time. The app is triggered to expire after a certain time. However, now it was trivial for me...

How to use SD Card in Android Emulator 1.5

Hi I am new to Android. How to use System memory as a SD Card in the Android 1.5 Emulator.I am using Eclipse IDE. ...

Android JARSIGNER GUI tool?

Newbie question. After I have written the Android App (easy part) I need to sign it and upload it (seems the hard part) Is there an Open Source app or tool that I can use to do this so that I don't have to write command shell scripts. JARSIGNER looks overly complex. I'm looking for a dead simple Sign-And-Package up tool. I am using E...

Android TextView Linkify problem with phone numbers and application version number

I have a problem with TextView and autoLink feature. I have an about screen in my application with some information like support phone number, email address, website URL and application version in form like 01.01.01 After setting autoLink="all" on the textView, all values are linked fine - except that version number 01.01.01 is linked ...

How do I get the logfile from an Android device?

I would like to pull the log file from a device to my PC. How can I do that? ...