Android :: Camera / SurfaceView App Returns Icon Not Emulator Checkerboard Image
Sep 29, 2010
I'm using the android SDK in Eclipse on Linux. I've used the code at itp.nyu.edu/~sve204/mobilemedia_spring10/androidCamera101.pdf to write an app to store an image captured through the camera onto SD card (there are various examples of this around). It works ok except that the image returned by the camera is not what's on the preview surface. Instead of getting the checkerboard image I expect, I get different versions of the android icon depending on which version of target I choose. If I render the image to an ImageView this is confirmed as it's the same as on the SD card.
View 1 Replies
May 7, 2010
I have seen a lot of posts about this, and it seems like the code below should work. I have created an SD Card image and added it to the emulator (and that works fine).
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType("image/*");
//intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(intent, 1);
It does launch and allow selection of images, but when I click on an image, everything exits and the emulator returns to the home screen, not back to my app. My onActivityResult is never called either. What am I missing?
View 2 Replies
View Related
Aug 14, 2009
As far as i know, Android emulator doesn't have a camera. To capture a live image we have to use the web camera. I have seen code in this web site to use the web camera in the android emulator to capture an image, but I don't know how to use this code.
View 2 Replies
View Related
Dec 8, 2009
On the G1 camera app, there's a handsome looking camera button which you can press to signal the app to take the picture. It's a round button with a little camera icon in it. Is that button resource available in android.R? I'd like to use it in my own app if possible?
View 2 Replies
View Related
Oct 28, 2010
Hi Guys! I'm coding a little app, but I don't know what I'm doing wrong. The App does the following: - Launches a Service which listens for an sms, then captures a picture with the cam and sends it to a predefined email adress. (no, i'm not trying to spy somebody out... I'm using the app to get a "3G-Webcam", sort of at least)
The problem: My App works great in the emulator, but as soon as I try it on my HTC Magic (cm6, android 2.2) it stops working.
CODE:.............
The permissions are all set, even the write to SD-card. What am I missing?
Note: I'm not using a surfaceview. Code:
CODE:......................
View 2 Replies
View Related
Jun 26, 2009
I am trying to set a camera preview in a custom SurfaceView but I get an exception each time I execute the initialization method.
View 4 Replies
View Related
Aug 27, 2009
I just got my camera preview working for my app, but it is not appearing where I want it to appear, and I'm not sure how to get it there. Instead of using the entire screen for the preview, I would like to put it inside a surfaceview in an activity xml gui. What do I need to change? Here is my code:
public class TakePic extends Activity {
SurfaceView camSurface;
Preview camPreview;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);//hide window title
camPreview = new Preview(this); //create preview
setContentView(R.layout.takepic);
setContentView(camPreview); //set preview as activity content
camSurface = (SurfaceView) findViewById(R.id.camsurface); }
View 5 Replies
View Related
Mar 25, 2009
I want to receive the data from the preview of the Camera, but without having to set a SurfaceView with a SurfaceHolder in the view of my application. I want to do something like this: Camera cam = Camera.open(); cam.setPreviewCallback(new MyPreviewCallback()); cam.startPreview(); This will not work because I need to call setPreviewDisplay (SurfaceHoler) before I start the preview. I can get a SurfaceHolder from a SurfaceView, but I don't want a SurfaceView, because I don't need one. I just want to handle the preview data by myself.
View 2 Replies
View Related
Apr 19, 2010
My application should hold a camera preview surface. The camera is fixed to landscape view via AndroidMainfest.xml I am quite new to the Android plattform programming. Of course I don't know much about the programming tricks and workarounds yet. I did a lot of research over the last two weeks (even studied the native Camera implementation), but couldn't find a good solution so far.
View 2 Replies
View Related
Oct 18, 2010
I'm using the phone's camera in an Android app to take a photo. I'm using Intents to use the built-in camera application.It works fine and the camera is brought up. I can take a photo and the phone presents me with three options: Cancel, Retake, OK. The first two work, pressing cancel returns the user to the app, but pressing OK and nothing happens. Apparently onActivityResult isn't being called, and the camera just stays on the screen. Nothing in the debugger either.Running the app on a Nexus One with Android 2.2.1. Same problem on the emulator running Android 2.0.
View 1 Replies
View Related
Aug 2, 2010
Saving the file code...
The last line gives a null pointer exception, why is BitmapFactory.decodeFile returning null? I can verify that the file is getting saved correctly as I can pull it using adb and see the png displaying properly.
View 1 Replies
View Related
Mar 27, 2012
I have an android application which contains multiple activities. In one of them I'm using a button which will call the device camera :
Code:
public void onClick(View view) {
Intent photoIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(photoIntent, IMAGE_CAPTURE);[code]....
The problem is that the intent data is null and the OnActivityResult method turns directly to the (resultCode == RESULT_CANCELED) and the application returns to the previous avtivity.How can I fix this issue and after calling the camera, the application returns to the current activity which contains an ImageView which will contains the picture taken?
View 1 Replies
View Related
Apr 13, 2010
Finally strace gave me this:
CODE:................
And several other attempts to call "link" that also fail (sshfs does not support hard links).
Is it possible to change the emulator's behavior to create lock files somewhere in /tmp (using some hash of image path as lock file name)? I am OK to try this myself: which repositories from https://android.git.kernel.org/ are necessary to rebuild the emulator alone, and where in the sources is the code responsible for image locks?
View 4 Replies
View Related
Nov 1, 2010
I am getting the following error when I try running my program in the emulator:
emulator: ERROR: the user data image is used by another emulator. aborting`
View 1 Replies
View Related
Aug 20, 2010
One using a Surfaceview, and the other using a custom view. According to the android SDK development guide, using a surface view is better because you can spawn a separate thread to handle graphics. Th SDK development guide claims that using a custom view with invalidate calls is only good for slower animations, less intense graphics.However, in my simple app, I can clearly see that using a custom view with calls to invalidate seems to render faster.What do you guys know/think about this?My touchEvent code is exactly the same, and my drawing code is exactly the same. The only difference is that one is all in the UI thread, and the other is using a tread to handle the drawing.
View 1 Replies
View Related
Jun 30, 2009
I have an application which launch automatically after the booting finished,but the application icon is displayed in the android emulator.Now i want to hide that icon from the user.So that the user cannot know from the application is lanuch and they cannot launch that application manually.
View 2 Replies
View Related
Sep 19, 2010
refresh menu icon image, where can i get it it's not here
View 4 Replies
View Related
May 10, 2010
I want to use the microphone icon used by android OS. Where could I find it?
View 2 Replies
View Related
Mar 5, 2010
I want to put an icon in the notification status bar with 1 image + a number. How can I do in using the Notification.icon method?
View 8 Replies
View Related
Apr 2, 2009
Is there any 1.5 image going around for the emulator? I would like to try my apps with onscreen keyboard. Maybe someone is actually making nightly builds but I can't find any.
PS: Not sure if it's appropriate to ask in this list.
View 11 Replies
View Related
Jan 10, 2010
I thought it may have been my eyes, when I thought I saw an upside-down Android icon for a contact the other day, on my Android 1.5 device - Samsung Moment. I was playing with contacts just now, and I saw the upside down icon again. Then I was curious, went to see other contacts, and I noticed the Android icon facing right, then facing left in other instances. There is no rhyme or reason as to when the Android icon will change positions, but it is there.
View 1 Replies
View Related
Jun 7, 2010
I'm populating a list from the DB and I have a image field in the DB which contains a URL to a image file.
ListAdapter adapter=new SimpleCursorAdapter(this, R.layout.row, constantsCursor,
new String[] {"title", "subtitle", "image"}, new int[] {R.id.value, R.id.title, R.id.icon});
However, the other fields are populated, but the image remains empty. Why?
View 3 Replies
View Related
Feb 4, 2010
I have created listview by using arrayadpter i add arraryadapter to listview containing string array but i m unable to add icon to eatch listitem.
View 1 Replies
View Related
Jul 16, 2009
If I have a reference to a view, how can I overlay an icon image on top of an exisiting view?
In the screenshot below:
http://android.kanokgems.com/sms-unread-count
It overlay an icon at the top right corner of the dialer icon. How can I do that?
View 2 Replies
View Related
May 22, 2009
Strange behaviour with emulator running with Cupcake. When emulator is launched (via ADT), a SD card is mounted correctly, and I click on Camera, I have a black screen and nothing happens, I got the famous error with Wait or Force close wait, wait, wait nothing happens. I create with AVD the target 3. I'm on Windows XP SP2.
View 9 Replies
View Related
Jun 19, 2009
I've just noticed that launching the Camera and Camcorder (in the emulator) would result in a black screen (instead of the famous moving small boxes), i've looked for why this happening on the net, apparently that the camera is disabled by default when you create an AVD. Decided to create another AVD with the camera enabled and launched it and still getting that black screen. Anyone has any idea how to fix this ?
My problem in the first place is that my application is using the default camera application using intents just like in the following: Intent imageCaptureIntent = new Intent (MediaStore.ACTION_IMAGE_CAPTURE); imageCaptureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File("/sdcard/imageCaptureIntent.jpg"))); startActivityForResult(imageCaptureIntent, WHATEVER_REQ_CODE); I thought that there's a problem in my intent request but like i said before, running the camera on the emulator itself is the problem. By the way, You can run the "camera preview" in the API demos with no problems, how come!
View 5 Replies
View Related
May 30, 2010
How can i use web cam with android emulator?
View 3 Replies
View Related
May 21, 2010
I wish to simulate camera in the android emulator using the webcam. Basically I need to only take photos with the camera in the emulator (live preview is not needed i.e if it makes it any easier) I followed the tutorial here which is the only one I could find that was close to my requirements But many of the libraries used in that tutorial(like android.hardware.CameraDevice) are not available in present sdk and are replaced by new libraries(like android.hardware.camera). Any help on how to do this in the present sdk(2.1 or 2.2) would be much appreciated.
View 1 Replies
View Related
Aug 31, 2009
I want to add an image icon in expandable list view .I have seen the tutorial they have added only in child elements .Is there any other way to add image icon in parent.
View 4 Replies
View Related
Mar 6, 2009
When we insert images or media files to sdcard, how we can see this in emulator, means in which folder, i inserted some images and checked in "pictures", but i cant see anything there, just blank only --"No Pictures found" displaying. For media i checked in "Media scanner" under 'Dev tools", there also cant see anything.Can anybody guide me in this issue.
View 5 Replies
View Related