Android :: Cupcake 1.5 R1 Surface Created Is Not Called
Apr 28, 2009
I've created game, everything works fine on all previous android versions except current cupcake 1.5. It works even on cupcake pre release.I'm using exact the same build.xml, sources and resources. The problem is that surfaceCreated is not called : SurfaceHolder mSurfaceHolder = getHolder(); mSurfaceHolder. addCall back(this); setFocusable(true); WaitForScreen(); - here I untill surfaceCreated change variable that it's ready,but it's never called. I just can explain that I'm running SurfaceView activity after stopping regular View activity (for the game menu - it was easier to create it). Please help me if you can figure out something. I'm just a developer not a Android engine tester. If they are putting such stuff to the market they should test it a little bit (not talking about discovered VM crashes instead of exceptions).
View 4 Replies
Jan 22, 2009
How do I create blur surface from android.view.Surface?
View 2 Replies
View Related
Oct 26, 2010
I am running into an issue with the way my asynctasks are executed. Here's the problem code:
firstTask = new background().new FirstTask(context);
if(firstTask.execute().get().toString().equals("1"))
secondTask = new background().new SecondTask(context);
What I'm doing here is creating a new asynctask object, assigning it to firstTask and then executing it. I then want to fire off a separate asynctask when the first one is done and making sure it returns a success value (1 in this case). This works perfectly on Android 2.0 and up. However, I am testing with Android 1.5 and problems start popping up. The code above will run the first asynctask but doInBackground() is never called despite onPreExecute() being called. If I am to execute the first task without the get() method, doInBackground() is called and everything works as expected. Except now I do not have a way to determine if the first task completed successfully so that I can tell the second task to execute. Is it safe to assume that this is a bug with asynctask on Android 1.5? Especially since the API says that the get method has been implemented since API 3. Is there any way to fix this? Or another way to determine that the first task has finished?
View 2 Replies
View Related
Feb 3, 2010
I am planning to write a video player application and I am planning to use the gstreamer on the native side. I am trying to use the SurfaceFlinger for the rendering part. For this I have written a test program to experiment on the rendering part. I am using the surface flinger wrapper from the project
http://gitorious.org/rowboat/external-gst-plugins-android
But the following ERROR occurs when we try to run the .apk.
CODE:.......
The I changed the permission for "android.permission.ACCESS_SURFACE_FLINGER" in frameworks/base/core/ res/AndroidManifest.xml to "dangerous" and recompiled. But got the same error.
Then I commented out the "checkCallingPermission" method in IServiceManager.cpp and recompiled. Then also i got the same error.
View 4 Replies
View Related
May 20, 2010
I am working on a graphics application in Android. I have a question regarding MULTIPLE SURFACE VIEWS. Can I be rendering multiple surface views at the same time. Initially, when I had two surface views in the same activity, it didn't seem to work, as it used to show only one at any time. But, with one surface view attached to one activity, is there any way I can keep the background activity's Surface View alive so that both the surfaces get rendered together?
View 2 Replies
View Related
Dec 27, 2009
Looking the doc with class SurfaceHolder is possible set the kind of surface format. I need to show images YCbCr_420_SP format. If I set YCbCr_420_SP format is not clear after how I can set the data. With Canvas object I can draw only bitmap format and not YCbCr_420_SP. Then my question is : can I draw directly on surface using YCbCr_420_SP data ? how ?
View 2 Replies
View Related
Aug 29, 2009
I am trying to add an image on surface view. I have coded...
View 5 Replies
View Related
Oct 17, 2010
I'm attempting to create a 3d game using OpenGL. I have a very basic world and am now working on a character. I want to map a texture to the head which will be oval shaped. How do I do the mapping? I know how to map to flat surface. I'm wondering if the normals can be used to help but I've never done this before and when I search Google I don't have any luck. I'm planning on doing this all programmatically and not using Blender or Maya if that makes any difference.
View 1 Replies
View Related
Aug 7, 2010
I've read several example programs and tutorials to try and solve my problem but they all seem to go the same way. I've used a couple Activities and xml documents to create a menu that loads when my game starts.When the user clicks the "Start The Game" button, it loads a new Activity that sets the view with my game thread and all of the game properties.I know this activity works because I've run it alone as its own project, but every way I've tried to start it after the Menu,I get a nullPointerException and it force closes.I read the SurfaceViewOverlay tutorial and attempted to use that implementation, but I'm using a SurfaceView, not a GLSurfaceView.I'm debating rewriting my entire program to use OpenGL but I figured I would see if anyone else knows what I'm doing wrong here.If you need the code snippets I can paste some here, but it's not really the specific code that's wrong.
View 1 Replies
View Related
Apr 26, 2010
I want to hide my app screen and then when the user clicks on the app again, I want to bring it to the foreground , but I want the app to maintain the screen that was pushed to background. Is there any way to do that right now?.Because when I try to hide my app, the surface of my app is gettng destroyed and so when I try to relaunch the app a new surface is created and my app status is changing.
View 2 Replies
View Related
Sep 28, 2010
I have some images (.png format) that I use as drawables on the surface of canvas in my android app. The problem I have is mspaint only allows a rectangular image file, so whatever I draw on the screen always shows up in a box. Is there a (free) program or way I can edit the png files so that when they are drawn on the surface of my canvas, they are drawn to shape?
View 1 Replies
View Related
Nov 11, 2010
I want to change the size of surface view at run time when it is changed to Landscape Mode?
View 1 Replies
View Related
Apr 14, 2010
Can somebody tell me if we could bind one object on to another in openGL ES.say draw multiple squares on the surface of a cylinder.I know we can draw them independently,but how to make them look like one single object??Is this possible?
View 2 Replies
View Related
May 3, 2010
I'm trying to render a 640x480 RGB565 image using OpenGL ES on Android using GLSurfaceView and Native C code. Initially I had a 0x0501 error with glTexImage2D, which I was able to resolve by changing the image dimensions. But now, in the "drawFrame" call, when I do glDrawTexiOES to resnder the texture, I'm getting the following error on the Logs: drawtex.c:89: DrawTexture: No textures enabled I'm already doing glEnable(GL_TEXTURE_2D), is there anything else I should do? Is there a complete example showing GLSurfaceView with native code using textures?
View 4 Replies
View Related
May 29, 2010
I have a simple program that draws the preview of the Camera into a SurfaceView. What I'm trying to do is using the onPreviewFrame method, which is invoked each time a new frame is drawn into the SurfaceView, in order to execute the invalidate method which is supposed to invoke the onDraw method. In fact, the onDraw method is being invoked, but nothing there is being printed (I guess the camera preview is overwriting the text I'm trying to draw).
This is a simplify version of the SurfaceView subclass I have:
public class Superficie extends SurfaceView implements SurfaceHolder.Callback {
SurfaceHolder mHolder; public Camera camera; Superficie(Context context) { super(context);
mHolder = getHolder(); mHolder.addCallback(this); mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
} public void surfaceCreated(final SurfaceHolder holder) { camera = Camera.open();
try { camera.setPreviewDisplay(holder); camera.setPreviewCallback(new PreviewCallback() {
public void onPreviewFrame(byte[] data, Camera arg1) { invalidar();
} } ); } catch (IOException e) {} } public void invalidar(){ invalidate(); }
public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
Camera.Parameters parameters = camera.getParameters(); parameters.setPreviewSize(w, h);
camera.setParameters(parameters); camera.startPreview(); }
@Override public void draw(Canvas canvas) { super.draw(canvas);
// nothing gets drawn :( Paint p = new Paint(Color.RED);
canvas.drawText("PREVIEW", canvas.getWidth() / 2, canvas.getHeight() / 2, p);
} }
View 1 Replies
View Related
Jul 19, 2009
I have openGL layered on top of camera view by using the 'workaround' specified at-http://groups.google.com/group/android-beginners/browse_thread/thread... and it works great.
However, has been mentioned before that surfaceviews were not designed to be layered ontop of each other- [url]
As you can notice in the code snippet thats mentioned in the first thread, to get openGL working on top of camera we are first setting the contentView to be the openGL view and then adding the camera (on top of it) instead of the other way around as one would expect it. I am assuming there's something strange going on in here as it has also been mentioned that Z-order is not supported on surface views- [url]
Now my question is will all devices have this behavior? Can I use this behavior in my app to get openGL layered on top of camera preview? Please answer this query, its so cool to have openGL over the camera preview! It opens up for some amazing stuff!
View 2 Replies
View Related
Sep 20, 2010
I am using android.hardware.Camera to get a preview and display it on a custom SurfaceView that implements SurfaceHolder.Callback.
I am trying to zoom in to the camera preview surface by a specified scale (not using the camera's digital zoom) but I can't seem to find a correct way to do it. I also need to be able to zoom out and scale down the preview.
I was hoping to be able to do this using a ScaleAnimation but it doesn't seem to work on SurfaceView, nor the FrameLayout containing the SurfaceView.
I also tried setting the size of the SurfaceView using setLayoutParams but that doesn't seem to work too well on various hardware and it would be tough to animate smoothly.
How to achieve this effect? Right now I am starting to think I might have to implement this using GLSurfaceView but I'm very unsure.
View 2 Replies
View Related
Jul 6, 2010
My objective is to run a glowing animation on an image.I am changing the image alpha to produce this effect.
I have used basic AlphaAnimation provided in android framework but found that its slowing down other animations. So i extended a class from SurfaceView and created a thread to update it. ( Again here, i am manipulating alpha of the image ).
Everything seems fine, except that i am not able to draw a transparent image onto SurfaceView.Its showing black color on the transparent areas of the bitmap.code...
View 1 Replies
View Related
Jul 6, 2010
I have a function that needs a Surface object to work. I'd like to be able to call that function from a background Service without starting a foreground Activity. Every Surface source in the API that I can see, though, requires a View that's laid out before the Surface becomes available. Are there other ways to create a Surface that I am missing, and can you point me to them?
View 5 Replies
View Related
Sep 15, 2009
As suface flinger uses fb0 for rendering the image and video. i want to change the frame buffer devices dynamically for rendering the image on the screen one time on Fb0 other time on Fb1. i am looking into the surface flinger code. but we are not able to get the pointer where to change for this. can simeone please give us some pointer.
View 3 Replies
View Related
Apr 1, 2009
I have an Activity that was created based on the TriangleRenderer example. It works flawlessly as a standalone project, but when I use it as the tab of a tabhost there is a problem. At startup the whole activity is just black - I can get touch events and do everything else but it doesnt show anything. When I change the orientation (and therefore recreate the activity) it all works well. Maybe the problem comes from the View focus. My SurfaceView is not focused when created inside of the tabhost. I tried to fiddle around with the methods available in my onCreate() and onPostCreate(), but couldnt find a way to get the SurfaceView focused. The following sourcecode blocks in the guardedRun() method because needToWait() is true because !mHasFocus is true. If I exclude the ! mHasFocus, it goes on but shows a black View anyways. Do you have any idea why it does work after orientation change, but not at the first startup? The Activity looks quite simple.
View 2 Replies
View Related
Aug 23, 2010
I have a SurfaceView that is being used to draw custom animations and I would like to overlay them onto a live-feed from the phone's camera. Currently, the SurfaceView that contains the animations has a white- background, but if I were to overlay them onto the phone's camera feed, they would have to be transparent. The camera and animation drawing cannot be done on the same SurfaceView. Is it possible to make a SurfaceView transparent? What is the best course to pursue the use of multiple views? My end goal is to essentially overlay the contents of another SurfaceView onto the Camera SurfaceView.
View 2 Replies
View Related
Sep 2, 2010
I'm very happy with my new smartphone, the Galaxy S from Samsung . I don't use any protection for the screen, so i wipe out the "fingerprints" with something to make it nice and shiny! However i did use, several times, paper tissues. Big mistake. If i hold down the phone in bright light, i see tiny scratches on the surface .
So only use cloth and nothing less if you don't use protection, but NEVER use paper tissues!
View 13 Replies
View Related
Aug 23, 2010
I have a SurfaceView that is being used to draw images, and I would like to overlay them onto a live-feed from the phone's camera. Currently, the SurfaceView that contains the images have a white-background, but if I were to overlay them onto the phone's camera feed, they would have to be transparent. The camera and animation drawing cannot be done on the same SurfaceView. What is the best course to pursue the use of multiple views that involve managing the camera and drawing images? Is it possible to make a SurfaceView transparent?
View 4 Replies
View Related
May 20, 2010
I have tried finding the names of the Android OS prior to 1.5 (cupcake), but no luck. Did Google give "A" and "B" versions of the OS dessert names or did that start with cupcake?
View 10 Replies
View Related
Aug 7, 2010
I've read several example programs and tutorials to try and solve my problem but they all seem to go the same way.I've used a couple Activities and xml documents to create a menu that loads when my game starts. When the user clicks the "Start The Game" button, it loads a new Activity that sets the view with my game thread and all of the game properties.I know this activity works because I've run it alone as its own project, but every way I've tried to start it after the Menu, I get a nullPointerException and it force closes.I read the SurfaceViewOverlay tutorial and attempted to use that implementation, but I'm using a SurfaceView, not a GLSurfaceView. I'm debating rewriting my entire program to use OpenGL but I figured I would see if anyone else knows what I'm doing wrong here.If you need the code snippets I can paste some here, but it's not really the specific code that's wrong, I think it's the way I'm using(abusing) the language.
View 1 Replies
View Related
Dec 1, 2009
I've G1 dev phone. Earlier I upgraded it to 1.5 using HTC website. Now I want to customize (make some changes to ) source code and keep the changes running on G1 phone. I wanna go with cupcake release. Could any body please give me some pointers. If I download cupcake source code from android website and do 'make' for which target it will generate the images ?[Emulator or G1 phone etc.,]
View 3 Replies
View Related
Jun 17, 2009
Is RTP streaming known to be working on Cupcake devices? I have not been able to start an RTP multimedia session with my G1 since Cupcake upgrade. It was working before the upgrade, e.g. by using the VideoView class and providing an RTSP URL. But the same test which was working before fails now. The RTSP OPTIONS and DESCRIBES exchanges are OK, and then there is a "PVMFFailure" in the Log, and a popup saying "Sorry, this Video can't be played".(Note: I removed a similar message that I sent yesterday because it contained broken links)
View 3 Replies
View Related
May 14, 2009
I'm considering an Android phone, but I'm a little worried about the restrictions on Bluetooth.Can someone confirm what's been 'fixed', and what restrictions remain after the Cupcake update? I've seen a lot of mixed information floating around the net.
View 6 Replies
View Related
May 20, 2009
Is android-1.5 and cupcake-1.5 is same?
View 2 Replies
View Related