android

Load image in device independent and screen independent fashion into a layout view using 1.6 SDK

I'm having trouble getting an asset image to scale up when I load it. The new call to BitmapDrawable(Resources, BitmapDrawable) is not available on 1.6 SDK. Is there a workaround to load the BitmapDrawable the old way and then somehow manipulate it? I have tried calling setTargetDensity() to no avail. My code (which doesn't scale proper...

Android: failed to setContentView when switching to ListActivity

[update] I got the error, which says "Your content must have a ListView whose id attribute is 'android.R.id.list'". Appearently nothing in my xml is ListView. But is that required? This is an follow-up issue on my previous question http://stackoverflow.com/questions/2548304/android-which-view-should-i-use-for-showing-text-and-image I r...

How to inform an Activity that another Activity was just started?

I just want to get numbers of times to be used for each Activity. So the very straightforward method I thought is increasing the count for an Activity when it was started. But how can I get the information? Thanks for your great help! ...

Height of screen in portrait mode only?

Hi, How can I get the height of the device for portrait mode? I have to create a bitmap (which is zoomable) and I just want to get a rough idea what the tallest height should be. getResources().getDisplayMetrics().heightPixels; does the above return the height, in portrait mode only? I'm not binding my UI to this absolute value, it'...

Android: handle unexpected internet disconnect while downloading data

Hi, I have here a function that downloads data from a remote server to file. I am still not confident with my code. My question is, what if while reading the stream and saving the data to a file and suddenly I was disconnected in the internet, will these catch exceptions below can really catch that kind of incident? If not, can you sugge...

How to kill an Android activity when leaving it so that it cannot be accessed from the back button?

In an given Android activity, I would like to start a new activity for the user at some point. Once they leave the first activity and arrive at the second, the first activity is stale and I want to remove it completely so it can not be accessed again from the back button. How is the best way to accomplish this? How do I kill or destroy ...

Urgent : Getting error on uploading apk to Android market

Hi, i m uploading my apk for 1st time on market and getting Error:The server could not process your apk. Try . My manifest file is:- <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="packagename" android:versionCode="1" android:versionName="1.0"> <uses-permission android:name="android.permission.INTE...

Mobile Application design: Menu Driven vs Tab Control

iPhone does not have Menus AFAIK; most of the stuff is driven by on screen controls and widgets. Android has menus, ofcourse. I am working on porting an iPhone application on Android platform. What are the disadvantages of Menu driven approach? Thanks. ...

Android Video Capture Sample App

Is there a stand-alone sample code for video capturing in Android ? ...

Streaming video from Android camera to server

I've seen plenty of info about how to stream video from the server to an android device, but not much about the other way, ala Qik. Could someone point me in the right direction here, or give me some advice on how to approach this? ...

How to generate R.java manually on Linux platform

I have a question. I am developing android application on Linux platform because i have to make a system.img with a application. When adding a drawable resource and building the project with mm command, i met a below error. "cannot find symbol R.drawable.icon_send_type" At above error, the icon_send_type is the added resource....

Why signed android apk is not running on emulator

I have made a signed apk of an android project. Whenever my client try to run it on the emulator, he faces the following error message: D:\Android\android-sdk- windows\tools>adb install -r abc.apk 500 KB/s (6940708 bytes in 13.534s) pkg: /data/local/tmp/abc.apk Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES] What is the resolut...

APIdemo invoke search problem android

For invoke search android example, every time query search result is received by onCreate(). How can i make it received by onNewIntent(). What kind of operation can cause onNewIntent() receive intent? ...

Build path error in eclipse for android

Hi, whenever I do a Clean on my project, I get 2 errors: 1.) the project is missing gen folder. 2.) there is a build path error. I go to "Configure build path" and uncheck "Android 1.6". It works. If I do thsi again , i go and this time check "Android 1.6". It again works. Can anyone please tell me why this is happening. Thanks ...

Application as part of Android Built

Hi, I had built a application using the Android SDK. Now I would like to package this application as part of the Android build. So that when I port Android into my device, it will appear in the Application menu. I tried, copying the apk file into the package folder, and include it in the make file. Doesn't work. How should I do it? ...

Display last picture

Hi I'm inserting an image from the camera (Taking a picture) into the MediaStore.Images.Media datastore. Does anyone know how I can go about displaying the last picture taken? I used Uri image = ContentUris.withAppendedId(externalContentUri, 45); to display an image from the datastore but obviously 45 is not the correct image. I try...

Scheduling notifications in Android

Hi, I need to be able to schedule multiple Notifications at different times in the future. I tried doing this with an AlarmManager, but that isn't suitable, for the following reason. From AlarmManager.set(): "If there is already an alarm for this Intent scheduled (with the equality of two intents being defined by filterEquals(Intent)),...

does M4V format file play in android??

i have a url for the video file.the format of that file is itunes M4V. i want to play it in android mobile. is it possible? if not so let me know? and also i cannot play the mp4 file in emulator why? ...

Composite operations in Android Canvas

I'm just starting with Android development and I'm coming from JavaScript/HTML world so I'm currently investigating the possibilities of the Android SDK. The HTML 5 canvas supports composite operations (See here). Is this possible in an Android Canvas? I scanned the API of the Canvas class but couldn't find anything useful. I need at l...

Write file in sub-directory in Android

I'm trying to save a file in a subdirectory in Android 1.5. I can successfully create a directory using _context.GetFileStreamPath("foo").mkdir(); (_context is the Activity where I start the execution of saving the file) but then if I try to create a file in foo/ by _context.GetFileStreamPath("foo/bar.txt"); I get a exception sayin...