android

Displaying Image by File Name

Dear All, I need to display an image by specifying the file name instead of by using resource. E.g showImage("background.png") instead of showImage(R.drawable.background). Any one knows how? Thanks a lot. ...

Trying to attach a file from SD Card to email

I am trying to launch an Intent to send an email. All of that works, but when I try to actually send the email a couple 'weird' things happen. here is code Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.setType("image/jpeg"); sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Photo"); s...

Open GL ES on Android: how to use gluUnProject?

Hi, I'm trying to convert window coordinates to object coordinates. There's a gluUnProject in GLU class, which requires current modelview, projection matrices and viewport. My question is how to get those matrices? I tried gl.glGetIntegerv (GL11.GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES, model, 0); and ((GL11) gl).glGetFloatv(GL...

Android InputStream Internet Disconnect

Hello, In my Android program, I have some code that downloads a file. This works fine, but since on a cell phone, you can be disconnected at any time, I need to change it do it reconnects and resumes the download when you are halfway through and somebody calls/you lose cell reception/etc. I cannot figure out how to detect the InputStream...

Static methods or Singletons performance-wise (Android)?

In an app with a small number of POJOs and lots of helper methods that operate on them, what's better performance-wise: to make the helper classes singletons or to make the methods static? ...

Android Strip Audio From Video

Hello, In my program, it gets MP4 video in, and I want it to output a MP3 (without any server-side stuff.) Since Android (and my app) needs to run on many different hardware configurations, this means I probably cannot use FFMPEG :( I know this may be very battery and processing power intensive, especially for a mobile phone, but I need ...

How to make a hint wrap in an Android EditText

My EditText hint is not wrapping. A hint isn't very useful if the last part is cut off. I am very cautious about restricting/forcing the dimensions my EditText box to ensure it looks decent regardless of screen dimensions. Here's what the relevant xml looks like: <EditText android:id="@+id/ET1" android:layout_width="wrap_conten...

Android. How to hang up outgoing call?

Hi, I am developing an application where one of the things we need is to control the outgoing call, at least to be able to stop it from our application. For now I tried using Intent.ACTION_CALL to use existing activity: Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber)); startActivity(callIntent); ...

android: check if a service is running

How do I check if a background service (on Android) is running? I want an android activity that toggles the state of the service -- lets me turn it on if it is off and off if it is on. ...

Android homescreen shortcut permission error

Hello, In my program it adds a shortcut to the screen. I get the icon on the screen fine, but when I tap it, I get: 03-01 20:00:29.410: ERROR/AndroidRuntime(796): java.lang.SecurityException: Permission Denial: starting Intent { data=http://www.example.com/ flags=0x14000000 comp={com.isaacwaller.example/com.isaacwaller.example.ExampleCu...

How do I obtain crash-data from my Android application?

How can I get crash data (stack traces at least) from my Android application? At least when working on my own device being retrieved by cable, but ideally from any instance of my application running on the wild so that I can improve it and make it more solid. ...

Is it possible to force network traffic through Wifi or the TMobile network?

I'm wondering if, with the G1, it's possible to force the network traffic to pass through the Wifi or through the Cell GSM network. I need to force an application to connect through the tower network to get some login information. Is this possible? Anyone have any ideas as to how this would be possible? I'm trying to accomplish this ...

Where are the schemas for XML files on an Android project?

Where are the schemas (DTD or XML schema) for the XML files used on Android like AndroidManifest.xml or the layouts? ...

Android - different image for rollover on ImageButton

Hi Is it possible to specify a different image when the user's focus comes to an ImageButton? I want to display an image button on a LinearLayout and change the image when the user's focus comes on the button or when the user presses the button. Thanks. ...

How to change the star images of the RatingBar?

With Android SDK 1.1 r1, is there any way to change the RatingBar widget class's star image with my own? Is this possible at all? If so, then how? Thanks. ...

Native C/C++ code on an Android platform

Hi, Does anybody know the answer to the following questions? Is it possible for device manufactures can develop native C++ applications on an Android platform? How can I develop my own native C++ application / library that has an upper layer Java front-end / API on an Android platform? Thanks, Munish ...

android: install fails on hacked phones

Can anyone tell me the difference in how an application is delivered and installed to an android G1 phone when it is downloaded from Market vs downloaded from my webserver? This little test app: http://yootles.com/outbox/TallyBee.apk (keeps a simple count) Installs on my (unhacked) G1, but fails to install on two friends' (hacked) G...

Android Override Explicit Intent

Hello, My app needs to have a intent-filter that responds to a intent that has it's component set (a explicit intent.) Here is a example. Intent i = new Intent(); i.setClassName("com.compareeverywhere","com.compareeverywhere.ScanActivity"); startActivity(i); Just a simple intent-filter will not do - because the intent is made for a ...

Android: Is there a PC port?

Is it possible to have Android running on x86 computers? ...

android - go to settings screen

Hi I want to open the Settings-> Sound & Display-> Phone Ringtones screen from my application. How can I do that? Thanks. ...