android

Need help displaying randomly chosen image on activity load and button press

I'm trying to just make an activity that simply loads a random image when it's loaded. It compiles fine and loads fine. But simply doesn't work. Any ideas what i'm doing wrong? It's making my eyes bleed. ------------Here my RandomImage Class -------------------------------------- package com.package.name; import java.util.Random; im...

How do I inform the search suggestions view of the DPI of my images displayed as thumbnails?

I have an activity which uses the Android search and the auto search-suggestions capability. The thumbnails I am using in my activity are all stored on the SD card (there's a lot of them) and are all in MDPI resolution. When using them in my activity this is fine as I can account for this and scale appropriately, however in the search ...

Android: Recording SoundPool output

I'm allowing the user to push buttons to play sounds via a SoundPool. Is it possible to record whatever the SoundPool is playing so that the user can record a sequence of sounds? ...

SQLite and Android. How do I use String Having in my query??

I have a query that pulls everything from a database into a list view. return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_HEIGHT, KEY_BODY, KEY_HOMEID},null , null, null, null, null,null); | String Having is the 3rd from ...

Overlay VideoView but keep touch focus on underlying activities in Android

I'm trying to create an app that will display a video in a VideoView in a transparent activity but keep the touch focus on any underlying activity. For example, if I have one app opened and my app is launched, the video will show but the user can still interact with the app they were previously viewing. I have the transparent activity an...

Adding buttons at run time to each row in a list view

I am working in an android application that uses a list view. I currently have a XML for the row layout with only one text view. Based on certain conditions, some rows will have one additional button and some other rows may have 2 additional buttons. Can I override the getView method of the adapter class to do this logic? is there any pe...

Same option menu in all Activities in Android

Hi, I have 10-15 activities in my project. I want to have the option menu mostly in all Activities. Then is their any way we can do it at one place and it appears in all activities. Also, I will like to hide the option menu in some. So, is it possible or I have to write option menu code in all activities. Regards Sunil ...

Android - Creating a notification from a SMS BroadcastReceiver

My program uses a BroadcastReceiver to scan for SMS (which works and can create a toast message based on text content). But I would like for this to fire off a notification (just like the system generated ones, but I am going to dynamically drive this based upon the content. So far I have tried the following code after I have recieved th...

Best approach: HTTP POST (multi-part) from Android to GAE

I would like to capture an image from the camera on Android, and send it to Google App Engine, which will store the image in the blob store. Sounds simple enough, and I can get the multi-part POST to GAE happening, but storing to the Blob store requires the servlet return an HTTP redirect (302). So, I need a connection that can follow re...

How do I get multiple icons to launch different activities in one application?

I have an application with two activities and I'd like to be able to have two icons appear in the launcher, each launching the respective activity within the app. Specifically, I want one icon to launch my main app, and another icon to launch my settings activity. Is this possible? Here is what I've tried so far: <activity androi...

How to add event to Google calendar in android?

hi i try to add a event to google calendar from my application.It adds the event to google calendar but it gives the UI "The application has stoped unexpectedly.Please try again." code is here: myService.setUserCredentials(userName, userPassword); Log.d("debug", "Login accepted "); SimpleDateFormat sdf = new ...

Android: how to get a handle on each image while recording from camera

How do I obtain a handle on each image that the camera feeds into your recorder application? ...

Android app stopping unexpectedly when built...XML layout file problem?

Hi there I've built the bare bones of my app so far in Eclipse using an adapted version of the LunarLander app provided by Android Developers. I've adjusted bits and pieces and have no errors at all though when I run it in the emulator it keeps saying "the application has stopped unexpectedly" and i have to Force Close. Is it possible ...

Passing context into timer..is this safe

i'm using a timer wich needs context.. Now i have the following code : mContext=context; mEventID=eventID; CountDownTimer cdTimer = new CountDownTimer(20000, 1000) { public void onTick(long millisUntilFinished) { // Do nothing onTick... Sorry } public void onFinish() { int delet...

minsdk problem in android

I developed application on 1.6.in manifest i gave: <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/>. When I run application in android 1.5 version.i am getting error java.io.FileNotFoundException: res/drawable/title_bar_shadow.9.png If I make one drawable folder and keep the images inside drawable. It is working ...

Port forwarding on linux local loop to connect two android emulators

I am trying to communicate between two android emulators for communication , thus I am trying to forward port X to port Y on 127.0.0.1 where port X is the port I am transmitting too and Y is the one I am receiving . Is this possible and if so how do I forward the local ports? ...

Android Unable to start activity

Here is my LogCat log: 07-17 14:05:10.226: INFO/ActivityManager(71): Starting activity: Intent { cmp=com.mohit.gtd/.TaskEdit } 07-17 14:05:10.316: VERBOSE/GTDActivity(579): Starting TaskEdit activity 07-17 14:05:10.576: DEBUG/PhoneWindow(579): couldn't save which view has focus because the focused view com.android.internal.policy.im...

create layout through code

I created layout through code so that i can add multiple views on that layout using code below. public class AndroidPrepChart extends Activity { GraphicalView gView; GraphicalView gView2; GraphicalView gView3; BarChart barChart = new BarChart(); BarChart2 barChart2 = new BarChart2(); BarChart3 barChart3 = new B...

Trouble with Android App Uncaught Exceptions in the Log

When I launch my app I get the following errors in the log. Can you anyone decipher some of them for me, and give me a potential solution? I would be so grateful if you could as its proving very frustrating and I am new to Android development. I am using Eclipse SDK with an Android AVD at 1.6 SDK level. Thanks.. 07-17 11:05:57.046: ERR...

Which Android service path to choose for implementing a large upload?

I am trying to implement a RESTful API in which I have to upload files that are relatively large for a mobile platform. The upload could take anywhere from 30 seconds to 5 minutes. I would like my application to be completely usable while the upload takes place. I've been doing some research and I've come across a few methods from whic...