Android :: Failed Binder Transaction When Passing Byte - From Camera - Between Intents
Feb 16, 2010
I have a problem with an app that lets the user take a picture. I've posted it on some forums already, but nobody seems to recognize the problem. Hopefully someone here knows a solution :)
I've put the code of taking a picture in a seperate activity. Then I call the camera intent from my main activity using activityForResult. In the camera intent, I use putExtra to return the camera image (as a byte[] without doing anything to it). But when the program transitions back from the camera intent to the parent intent that called it I get a Failed Binder Transaction error in the logcat because the byte[] is too big. But I don't understand this, because the image is not even taken using the maximum resolution :S
The code of my camera intent is:
CODE:......................
View 6 Replies
Feb 15, 2010
I get the Failed binder transaction error in the logcat when returning the image taken with the camera from the camera intent back to the parent intent (as a byte[] using putExtra). I don't understand why, its not like its a big bitmap or anything. It only happens when i take pictures with lots of light, because then the byte[] is bigger. The error occurs when leaving the camera intent. Does anyone see a mistake in my code?
Here is the code of the camera intent:
CODE:.............
And here is the code that calls the camera intent:
CODE:..................
View 1 Replies
View Related
Jan 4, 2010
I currently have a lot of problems with this error. I programmed a widget and a service that runs in the background. This service is updating the widget on different occasions (position changed, screen turned on, timer based...) with images and text it's loading from a server. After a couple of updates I always get an error from the JavaBinder, at least that's what DDMS says. Reproducing the problem with my app is quite easy but I just can't figure out what's going on there.
View 6 Replies
View Related
Nov 17, 2010
I have searched and searched and I just can't get this code to work. I have a main.xml layout and a setting.xml. I have some values I would like the Settings.class to change in my main apps class.Three string to be exact. I have tried this simple test code in my main app class.
settings.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v) {
Intent intent = new Intent(v.getContext(), Settings.class);
startActivityForResult(intent, 0);}});
//Then a function
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent){
super.onActivityResult(requestCode, resultCode, intent);
Bundle extras = intent.getExtras();
String value = extras.getString("myKey");
if(value!=null){
Log.d("hmmm",value);}}}
In my settings.class I have the following
returnHome.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.putExtra("myKey", "YEAH");
setResult(RESULT_OK, intent);
finish();}});
Back in main app class it is not getting logged. Like I said I have three string in the main class that I want settings class to change and send back.
View 2 Replies
View Related
Oct 29, 2010
Why is that the object has to be serialized or be Parcelable in order to be passed to an Intent ?
View 1 Replies
View Related
Mar 30, 2009
How do you pass an intent from a service to a new activity launched from a main activity? There's a passextra( intent src ); but I don't think thats what I am looking for?
activity main > start service( intent wuteverserviceintent );
activity main > start activity( intent newactivityintent );
View 2 Replies
View Related
Jul 23, 2010
I ask if there is a simple way because there is a google issue report saying that using decodeByteArray isn't possible. But that report originated in 2008 and I was hoping there was a solution not posted on there. The method listed on the issue report was to decode the format yourself, but I'd prefer to not have to put that in and slow down the program.
View 1 Replies
View Related
Sep 28, 2010
Why does "failed to connect to camera serfice" happen on occasions?
View 5 Replies
View Related
Nov 7, 2009
I have some code that is creating and removing alarms, and which works great in Android 1.5 and 1.6 but breaks on the Android 2.0 AVD.The code that's giving this exception is: Code...
View 3 Replies
View Related
Oct 8, 2010
I have included camera functionality in my application. I have also launched the app in the market. I got an error message from one of the users that he is getting an error while opening the camera...
I have tested the app on the device on 2.1. The error i got from the user is using nexus one which will mostly run 2.2...Here's the logcat error that i received...
java.lang.RuntimeException: setParameters failed
CODE:............
I ran the app on 2.2 emulator also to check it. But it worked fine. can anyone please tell me why the error is occuring?
Here is the class which i mentioned in the comments :
CODE:..................
View 1 Replies
View Related
Jul 22, 2010
My camera stopped working at the worst time just when I needed to take some pics at a dinner today. Has anyone encountered a "Camera Failed" message after opening the Camera application? I tried rebooting many times (at least 5-6 times) hoping it was a software glitch, but would not go away. I was testing the GPS navigation (using Google Maps) and my battery drained from 60% to 30% in 20 mins!! Does using navigation or low battery charge screw up the camera?I was sure it was a HW defect thinking I had to return the unit, but when I got home, and plugged into wall charger for a few minutes, I found that camera started working again.
View 9 Replies
View Related
Aug 31, 2010
I have been watching the Google I/O presentation by Virgil Dobjanschi on the correct way to implement REST on Android with services and content providers. http://code.google.com/events/io/2010/sessions/developing-RESTful-android-apps.html
Based on the video I'm doing things the wrong way, which is not surprising given how hard the right way is. Anyway, having been shown the promised land in the video I'm having a bit of a problem figuring out how to get there.
I have most of it nailed but the one thing that's defeating me is the Binder Callback that Virgil references in the slides (see link above), on page 43 it shows step 2 as starting the service with startService( intent ) and step 10 as returning status information using a Binder Callback. There is no example code anywhere in the presentation which is rather frustrating. There is talk of open sourcing the Twitter client which apparently uses this approach but nothing yet and the announcement was in April.
In the video he states: "What is a binder callback? A binder callback, think of it as an interface that was passed in the request intent."
I have searched all over the place but have not been able to find any doc or examples that show how to pass a callback as part of an intent. Nor can I figure out any other way of passing in a callback.
I thought he may be referring to binding to the service and implementing the callback that way. However, he is specifically referring to a local service and using strarSerice() and not bindService(). Also with bindService() the service will be destroyed if the activity is destroyed which defeats the idea. The workaround is to use startService() and then bindService() and leave the service running for the duration. The other problem with bindService() is that the callback can not be use until onServiceConnected() completes which complicates the code even further as the action instructions can not be passed in the intent because the return callback may not be in place in time to return the results.
View 1 Replies
View Related
Jun 21, 2010
The wife is on the road with her new samsung galaxy s. she needs to take some pics on this trip and the camera suddenly stopped working.. i tried the cam yesterday and it worked fine out of the box (phone is 2 days old now). when launching the camera app the phone throws up a 'camera failed' warning and quits out of the app.
View 10 Replies
View Related
Sep 2, 2010
I've had my Samsung Galaxy S for a couple of weeks now, and the last time i took pictures with it was on 29th August. I tried the camera yesterday and got this message.
What happens is the camera app opens, and instantly displays this message and all you can do is click ok. When you do that, the app closes.
I tried many things, including trying to press other buttons quickly before the error message comes. I managed to switch to camcorder mode and even press the record button in that time, but all i got was video recording failed message.
I checked on the forums for people who had similar problems and here's a list of things i tried so far:
1- Uninstall Fring
2- Return to Factory Settings
3- Fully Recharge Phone
4- Take out battery, sim, external sd card, wait for 5 mins and restart
5- Take out external sd card altogether and restart
So far nothing has worked. I haven't dropped or hit the phone anywhere. It hasn't been in temperatures less than 10 degrees celcius or over 25.
I can't think of anything else to do really, other than calling up warranty line. The problem is i'm going on holiday soon and the only reason i wanted to get this phone before my previous contract ended was to be able to use the camera while on holiday and now all my plans have gone down the drain.
I even tried reinstalling fring and making a test call with it, and i can confirm my front facing camera is working fine. It's the one on the back that's not working.
I tried installing other applications as well which would use the phone's camera and every each of them force closed when i tried.
I can't send it off with warranty until i come back from holiday anyway, so maybe froyo would be rolled out by my provider by then... I wonder if that would fix things... But i thought returning to factory settings would have fixed it too, which it didn't...
View 4 Replies
View Related
Oct 15, 2013
I was taking a walk and taking photos with my 2 month old galaxy s4. I have never had any issues with it. intill yesterday, I encountered a camera crash. I took out my camera, made a panorama, and then switched to auto mode and that's when my camera froze for like 30 seconds. after, it unfroze. I took a picture and the picture came out well accept the white black little horizontal lines on the top and bottom of the photo. after that I got worried so when I went back to the camera, it said the camera failed message and then it brought me to the home screen. after that, I accessed the camera again and everything was fine, the camera worked, accept the interface was frozen. I could not press the shutter button, gallery button, mode button, video button, etc. so I rebooted my phone and now the camera works perfectly. yesterday after the reboot I took pictures the whole day and It was perfect. today it is perfect too, no crashes. im just getting a little paranoid about why this happened and I am scared something is wrong with my phone as I worked and paid full price. everything is alright now im just wondering, was this a glitch in the software? did the camera crash because it was having a hard time that second to go back to auto mode from panorama mode? this is again, not happening any more but what was the message all about? how come it works now? is my phone alright?
View 7 Replies
View Related
Feb 26, 2013
I have an Note II , and several days ago it gave message "camera failed" when i open camera. front camera is working. but primary doesn't.
I have tried everything, even changed 4.1.1 to 4.1,2
View 3 Replies
View Related
Apr 27, 2013
I have Samsung galaxy y pro duos....
when I open the camera >>it shows "camera failed ErrorCallback.onError(1) and the camera not working .... when i call *#34971539# ....Nothing Happened ...I Think I don't have a firmware for the camera ... how can i fix this ???
View 8 Replies
View Related
Jul 30, 2010
I made a code for my understanding of Android Service class.
It has just a single Activity and Service in apk. Service is the same as the sample code of API reference as below: http://developer.android.com/intl/ja/reference/android/app/Service.ht...
A client side is an Activity based on the above sample, and just added the following code:
CODE:.......
My sample application has a check box which starts(binds)/unbind to the local service on a single process. The local service instance is created by every bind request (and destroyed by every unbind).
If I press the button repeatedly, then LocalService$LocalBinder is leaked!
The problem is not resolved even If I set an obtained binder to null (like below).
CODE:...............
View 6 Replies
View Related
Sep 10, 2010
What is the best way to add a new native service that uses Binder and can get past the service_manager.cpp restrictions on what users can add services? I have created a new native service that is similar to the MediaPlayer. I make the addService() calls to add the Binder service to the system. This worked fine when the service was started as root. I moved the new service to be started as the "media" user. Then I receive permission errors because of the table in service_manager.cpp where there is a check for users and allowed Binder services. Do I have to add my service to the table or is there some other way?
View 2 Replies
View Related
May 21, 2009
My application starts a remote service and binds to it. If I close the application with the "back" button there are still some threads running (listed in the Debug View of Eclipse) - main thread, and three Binder threads. In onDestroy() I call unbindService(service_connection) - is there something else to clean up?
View 4 Replies
View Related
Feb 23, 2009
I create a Person class implements Parcelable in Android, The Person include a byte array field. When set the byte array size more than 40000, then find !!FAILED Binder Transaction!! Why the byte size so limit ? How can I set the transaction size in Android?
View 2 Replies
View Related
Feb 17, 2010
The object passing between an Android service and the remote binder is happening through serialization of the object. If the service needs to return a very large collection, it seems very inefficient to use this. What is the recommended way to deal with this?
View 1 Replies
View Related
May 15, 2010
I'm using the SQLite3 database system in the Android library. I need to execute a query during a transaction to see if there is a similar entry already there. If there is, I have to perform some other logic and adjustments before I add a new row. Can I execute a query within a transaction and get the result back immediately?
View 1 Replies
View Related
Mar 8, 2010
I want to add a catch block, and I want to issue a rollback. Is it possible, and at all do I need it?
View 1 Replies
View Related
Aug 10, 2009
I made a programe to update phonetic_names of contacts...
View 2 Replies
View Related
May 6, 2009
I've been researching how to best implement a service which performs a network transaction and returns data to the caller.
Clearly, this needs to happen on its own thread which means some form of async response. I can see at least three ways of doing this--some more complex than others. In the descriptions below, C is the caller, S is the service.
1) C wraps a Handler in a Messenger object, adds this to an Intent. C then calls startService with this intent. S extends IntentService which runs the Intents received in a worker thread. S then sends a message to C via the Messenger. This has the benefit of not requiring any of the async binding process or making an IDL interface that needs to be compiled into C. This seems to be the closes to a Handler-based response mechanism of Local Services.
2) C binds to S and then uses AsyncTask<> to make a blocking call to S. S performs the network transaction and returns the data in the return value or an out parameter. This requires the async binding process, but does not require a callback function since the inter- thread communications is handled by AsyncTask<> and the worker thread is in C's context.
3) Make the function called in S be completely asynchronous. S defines two interfaces: IMyService and IMyServiceCallback. S implements IMyService.Stub. C implements IMyServiceCallback.Stub. C binds to S then calls S via IMyService, passing its IMyServiceCallback binder. S spins up a worker thread and returns immediately. S then calls the callback when it has completed the network transaction.
I am asking for advice on which methods are most appropriate. I do not need the the service running constantly, only when the web transaction is required. C does not use S all the time--definitely don't want to bind during C's onCreate. However, I would like the time from when C determines it needs to use S to getting the results back to be as quick as possible (i.e. adding minimal latency to the already latent network access).
Is there any preference to having the worker thread in C or in S? Are there any significant problems with option 1?
View 11 Replies
View Related
Oct 9, 2010
Is there any article/paper that describes the transaction mechanism, why it is needed and how it works? eg: the ActivityManagerService class..
View 2 Replies
View Related
Apr 1, 2012
If I wanted to make an online transaction with my Android device and I was using a browser other than stock (e.g. Overskreen), then would my card details (used to complete the transaction) be at a safety risk due to the fact that I have made the transaction in a browser which is owned by a developer and so would he have access to these details and the like? R800i
View 5 Replies
View Related
Aug 7, 2010
I understand, at least on paper, the basic difference between the Content Provider and just directly accessing the SQLiteDatabase. I have a functioning prototype for my application, and currently it is just directly hitting the database. I don't really have any experience using the Content Provider pattern, but I have found out that I will need to share some data with another application.
I will only be sharing about 2 out of a dozen or so tables, so I was wondering if I should be just completely redoing the data layer to follow the Content Provider pattern, or just expose only those tables via a Content Provider for the sake of the other application and still directly access the database in the primary application.
One of the issues I ran into with my prototype was that I have some fairly complex transactions, and the code I wrote to get that working is not designed particularly well and isn't reusable at all. As I add more functionality to this app, I'm going to need a better designed data access layer, before I set off writing my own, does anyone know of any good resources with design patterns for this type of thing already? Also, if I need to go the Content Provider route, am I going to have solid control over the database transactions?
View 2 Replies
View Related
Apr 9, 2013
I have installed many applications on my Galaxy Grand duos, with binding the applications data to External SD card (32gb), what will be the best practice to backup all the application and the data before installing another firmware? I don't have enough space on internal sdcard to unbind the application data.
View 5 Replies
View Related