Animations Crashing on some Devices - android

My problem is that I build an app which works fantastic on all my devices. But on my friend's phone, not only the animations of the app seem to crash, but even his whole phone reboots. I also tried putting the animation in a try block, but no luck on that so far..
Intent openDaily = new Intent("nl.plplpl.ccs.DailyActivity");
startActivity(openDaily);
try{
overridePendingTransition(R.animator.flip_in, R.animator.flip_out);
}catch(Exception e){
e.printStackTrace();
}
break;
I also thought it could be the phone though, because he's running an Alpha version of CM10.1, but tried another ROM with the same result (Maybe driver related?).
Is anyway prepared to help me out on this one?

I also thought it could be the phone though, because he's running an Alpha version of CM10.1, but tried another ROM with the same result (Maybe driver related?).
Yes, if you manage to reboot / crash the whole device it's typically something driver / kernel / .. related.
A device should never crash as a whole regardless of what your app does. If your app does something bad you should get a nice error message and get back to the home screen.
A reboot will only happen if something within the system (and therefore not within your responsibility) goes horribly wrong. E.g. the graphic driver goes into some corrupted state and there is no way to recover. There is no way to catch those types of errors. If it was just a Java Exception it would not crash.
You can sometimes see within logcat (not filtered for your app) what happens.

Related

unregisterIRListener() is called & screen stop rotate

I own a rooted Galaxy S4 i9505, on Stock Android 4.4
Before changing everything on the phone, except root, I made a back with Titanium.
I setup all of my program, and the phone was working well, with a lot of apps that I freezed from Titanium.
i frooze them, because last time I deleted them, I met a problem with sensors.
Yesterday i decided to delete 6/10 of these frozen apps like: SHealth, SensorService (I thought it was related to SHealth), Album, Tripadvisor, Samsung Music, Samsung Books...
And again, I reach the same problem, my screen is not rotating anymore, and the proximity sensors seems not working also.
SHealth is not working anymore (MessageBox: SHealth has stopped), even everything has been restored with Titanium. Seems that SHealth start automatically after reboot, as I get the same error messagebox. I thinck SHealth or its SensorService is the source of the problem. If I could find from where it automatically start, maybe it would solve.
Same as before. Last time I reinstall all the phone, and everything was ok.
Here I tryed to check again the sensors with an apps, and all Sensors seems to work physically.
In aLogcat I get every sec: AbslistView(xxx): unregisterIRListener() is called.
Seems I have something killing the call of my sensors, but can not manage to find the source of this call, I would like to kill.
I tried to restore from Titanium, exactly as it was before + wipe partition cache + Dalvik, but it does not helps.
I would prefer not to reinstall, and understand the source of the pb as I thinck many people seems to have this kind of pb.
Thanks mate

Android App crashes on startup only on SGS2

I am having an app in the store which runs fine on most devices but on one particular
Samsung Galaxy S2 running Android 4.1.2 (version JZO54K.I9100XWLSS).
It crashes on startup without a crash-report from google or from crashlytics which i integrated. Its not actually a crash it just flashes the main activity a while until the phone shuts down:
A video of that behavior:
https://dl.dropboxusercontent.com/u/523370/20131004_115027%5B1%5D.mpeg
Its a device from a user, so I cannot debug it locally. (Is there something to get a live logcat stream from the phone over the air?)
Has anyone experienced such a "crash" on start only affecting one particular device?
I have a SGS2 where it works without flaws. Could there be any hardware reasons resulting in such a crash e.g. Memory issue.
I know this problem is not likely to be resolved without any further source code / crashreports, but maybe someone can point me in the right direction.
best regards,
Mike
Actually shoe rat saved my day!
Because shoe rat just commented on the case I am answering it for completeness.
The user enabled the option
"Do not keep activities" which lead to this strange behavior, because an activity was killed during the splash screen.
As a future reminder to myself I will get rid of the splash screen because its not holo-style anyway.
Cost me a lot of time to figure this out and i probably wouldn't have found it without your help.

LogCat goes crazy (Eclipse)

I'm noticing a strange behaviour when i plug in any android device to my computer.
It starts showing some messages in the LogCat in Eclipse as soon as i plug it in. Same thing with my HTC and ASUS tablet.
This has never happened before and I dont remember doing anything out of ordinary when I developed my app yesterday.
Any1 has an idea how to stop this ?
Thanks in advance
You can add filters to the logcat so that you only show relevant information.
From my experience it's perfectly normal for the logcat to start displaying messages as soon as you plug in a device. At the least it means it's working! ;)
However, once you start building and running your application and picking up errors the specific filter for your application will start displaying which will only show logs pertaining to your app.
It's set by default to switch to your app once an error displays, but you can change that default by going to Preferences > Android > LogCat and changing "Show logcat view..." from "Error" to "Verbose" or whatever works. That way it will switch to showing your application's logs faster. Beyond that, you can do further specific filters.
Hope that helps XD
This can't be stopped as such as the log cat in eclipse will retrieve anything where logging is being done of some sort whether it is an app, or android itself.
You can filter it, I think at the top of the log cat window there is a text field to only show log messages that contain a certain string and If I remember correctly there are also buttons to the right to only show error messages or warning or both etc.
I had the same problem with my Nexus 5. Eclipse wouldn't recognize the device, so I messed around with the device window a bit and then the log cat started to go crazy.
After several reboots, I un-checked the USB debugging option in the phone's Developer settings and re-checked it.
Problem solved.
I think something in the Device window changed when I performed this action, but I'm not certain.

Eclipse Android Debug Not Launching - No Errors, No Logs, Nothing

I couldn't find the answer to this on SO, so I thought I would submit a question/answer.
I'm not sure if this is version specific, so just in case it is I'm running Eclipse 3.7.2 and ADT 18.0.0.v201203301601-306762
Developing for ICS.
I spent a good portion of the morning running trying to debug my app. I would go up to the little green bug, and click on my project.
The Launch indicator starts at the bottom, fills all the way up to 100% then nothing. No errors, no log output, no logcat messages, nothing under console. For the most part, there is no output indication that something has gone wrong. It just doesn't launch.
I have been switching between and HTC device and an emulator for debugging - mostly using the device for tests right before a release.
So I thought I would plug the HTC in and try again. Plugged it in, logcat started rolling, clicked on the de-bug, same thing. No output, no logs, nothing. It just doesn't launch.
Answer.
I finally decided to (though this should have probably been one of the first things I did, however because there were no errors or log outputs, I thought this was something exotic.) check the debug configurations. Turns out that under the Target tab, the deployment mode somehow got switched to Automatic. However, I had recently deleted a virtual device. This lead to an Automatic launch, with no device selected for the launch. Thus, the launch was automated with no end point.
To me, it seems there should be some sort of error message for this sort of thing, something like, "You have not selected a device" or "Please select a device", which is why I immediately suspected a more serious issue - but hey, I'm just a developer.
At any rate, all I had to do, obviously, was to set it back to Manual and voila, she's a kickin' again.
Some may think this is a no brainer, while others more slightly crazy with a tendency to distort reality may end up having the same problem I did. So, in sympathy to the crazy/distorted reality type - here's the answer :)

Android app gets stuck when I turn tablet - first timer

I'm first time developer for these types of devices, and UI in general, so I could be missing something basic and obvious.
Everything seems to work fine in the emulator, but I don't know how to simulate turning it.
So I tried running the app on my pandigital (white model - lowest of the low it seems), and each time I turn the Android, it freezes up. At least the UI freezes up, I believe the debug messages are still printing.
This is a home project, I don't have other devices to try it on.
Sorry for being so vague, it's an issue I have been a bit neglecting, trying to work on more interesting issues first, but it's an issue that is bothering me in the back of my mind.
Anyway, I have an Activity that starts up a thread, and creates a class which responds to various events, it implements: MainInterface and SurfaceHolder.Callback. Is there something else I should be handling? possibly?
Is there some specific call I get when the tablet is turned? I'd like to put a debug message in there.
My guess is that you state in your AndroidManifest.xml that this activity will handle rotation events itself (perhaps because you copied it from some project where the activity did do this), and that this statement is a lie, your activity actually makes no attempt to handle rotation.
If this is the case, a sound way to solve your problem is simply to remove the lying android:configChanges from your manifest.

Categories

Resources