AVD blackscreen after enableLocalDatastore - android

Has anyone experienced something like this ? My app works but after I add the line "Parse.enableLocalDatastore(this);" in my Application class it stops. Eclipse tries to launch it but right after the white screen, it turns black and LogCat notifies this warning "05-24 14:15:20.683: W/ActivityManager(382): Launch timeout has expired, giving up wake lock!"
First time I experience such thing, tried searching on Parse.com and nothing.
Additional info:
Android + Google APIs v4.4.2
Parse v1.5.0

Well, it wasn't the SDK's fault.
Solution: Had to create a new AVD to test my app after adding the line "enableLocalDatastore".

^true, same here, I lost ~10h to find out why!!!! seems it is parse.com lib BUG!!!!! when build the android application on release mode!!!!!!!
solution add this :
Parse.enableLocalDatastore(this);
before
Parse.initialize

Related

Xamarin GCM Component - Manifest Malformed

I am developing an Android application with Xamarin.Android.
My application is running perfectly, but when I add GCM Component it gives the following error:
Android application is debugging.
The application could not be started. Ensure that the application has been installed to the target device and has a launchable activity (MainLauncher = true).
Additionally, check Build->Configuration Manager to ensure this project is set to Deploy for this configuration.
If I remove the component then it works fine.
Here is the image for the error:
I have tried many solutions from Google, but nothing has helped.
How can I prevent this error from happening?
You need to make sure that your package name does not start with an uppercase letter - from your screenshot, it looks like it does "RestaurantAPP".
This is a known issue with GCM itself and is not a bug in the Xamarin component: https://code.google.com/p/android/issues/detail?id=37658

LogCat is not showing null pointer exception

My LogCat is often not showing null pointer exceptions..
Sample:
ProgressDialog pd;
ps.show();
Application stops (do not reacts for any action), but there is no information about any reason in logcat.
Another sample is with database - if there is no DB and I'm making actions on it, the same happens.
I tried (that action with DB) on my colleague's phone and there was normal error. I have all needed programmer options in my phone turned on.
Maybe someone know , why it is so? It was not burdensome, when I had small app, but now when it's bigger, it can be really frustrating.
I get this with android studio too...
Close android studio, restart ADB, and generally it starts working for me.
If that does not work then put a breakpoint at the line .show(); ... Then open up the logcat and then skip over the breakpoint. It then shows, I have similar issues.
(Windows 7 64 bit - Android Studio 0.82)
I dont like the IDE logcat option honestly.
The SDK comes with an adb binary, use the logcat option from there via
adb logcat or my personal favorite built in alias, adb lolcat
This will give you the log information for EVERYTHING happening on the device, and can be useful tracking down issues caused by device state.
For example, you can see network changes in the logcat, and if your app crashes on network call you wouldnt have any idea why if you just used the logcat output from your app.
In my case I was using: Thread.setDefaultUncaughtExceptionHandler in my application file. If that is not turned off during debugging you won't see any exception output. ( Just make sure to turn it back on again when you release so you can still handle your issues ).

ParseInstaller.getCurrentInstallation().saveInBackground() is freezing my application

I am finding that about 1/5 of my tests are freezing, and after some searching for the problem I have narrowed it down to the line:
ParseInstallation.getCurrentInstallation().saveInBackground();
I am using Parse 1.5.1, and an Android 4.4.2 device. My application class looks like:
public class InitApplication extends Application {
#Override
public void onCreate() {
super.onCreate();
Parse.initialize(this, "my_App_ID", "my_Client_Key");
PushService.setDefaultPushCallback(this, MainActivity.class);
System.out.println("execution DOES reach here");
ParseInstallation.getCurrentInstallation().saveInBackground();
System.out.println("execution DOES NOT reach here");
}
}
The behaviour on my device is that I will first see a blank white screen for about 5 seconds, and then the screen goes black. I am not sure how long the screen stays black, as I usually force close. I've let it sit for about 10 minutes once with no change. I am unable to press the back button and any touch on the screen does nothing. I am forced to use my home button, then force the application to close. Upon reopening the application, it behaves and functions normally.
Further research led me to find this post: https://www.parse.com/questions/android-saveinbackground-lock-the-main-thread
But still, I have been unable to find a solution. One suggestion in the above post is to simply move the location of this code. I have tried this to some point after my main activity's onCreate() method (not to be confused with the application's onCreate() method). Behaviour appeared to be normal up until I got to the point where the getCurrentInstallation.saveInBackground() code is called, where my application froze and failed to respond until I forced it closed.
Are there any solutions to this problem?
I encountered the same problem as well using Parse SDK 1.5.1.
And I just downloaded the latest SDK 1.6.0 and problem solved.
Link to download the latest SDK.
You can track reported issue here:
Parse installation save causing app freeze
I already provided (confidentially) thread dump traces from my app. However at time of writing this post there is no useful feedback from Parse guys.
My humble opinion after looking into traces is a deadlock causing this issue after some trouble with server interaction. But it's just guessing.
Link updated
I do have the same issue and more.
The blank or black screen however happen not to all my test phones. It happens only to one of them (Android 2.3).
SaveEventually also does not work to the problematic phone above (all the other phones I have are working fine). It does not send data through successfully to the server. So I suspect that phone configuration of saving data on the phone itself before passing to the server when network is back on may be the issue.

android emulator over logged

I'm developing an android application using eclipse (ADT).
I've been doing it for a few months now, but suddenly today, when I start the emulator, it's over logging the logcat with this message:
Level: D
Application: system_process
Tag: ThrottleService
Text: deleteing /data/system/throttle/407640534
I searched and could not find a single thing regarding anything similar to this problem, it is impossible to use the logging system like this since it prints the same message more than 10 times per second.
I can of course use filters, but sometimes you want to watch all of the logs.
Any idea what this message is about and why it's being logged so often?
Thanks a lot.
Try a hard reset of the emulator. Instructions are here.

Debugging not working in a service class ?? what can cause this issue?

All of a sudden I am not able to debug anything that i am doing in a service even though i put breakpoints all over. but logging shows that all the lines are getting executed. Can someone tell me what could be causing this issue. I am using eclipse and i have set to "Build automatically".
Do you have an Activity which is launched at the beginning of your application?
If not you have to manually activate the debug on your process by using the DDMS tool in Eclipse.
In DDMS -> Devices, check your process (the line contains the package name of your app), select it and then click on the debug button. A debug icon will appear near your process, then you should be able to use breakpoints in your Service.
If you are using a Runnable try placing this in the run() method:
android.os.Debug.waitForDebugger();

Categories

Resources