Service not available in c2dm - android

I am running a sample push notification example.I have done the c2dm signup and got an email.But the problem is when i run the program logcat shows registration id as null and error as "Service not available".
Please help me.
Thanx in advance

This has happened in my application as well. I find that when the emulator starts you often need to let it run the intent (i.e. your main activity) and then exit the application. Start the application again from the emulator and it seems to work for me. A few things to double check while your at it:
1. Did you declare your receivers in your manifest file?
2. Did you use the proper package name in your manifest?
3. Did you run the google api (level 8) AVD
4. Did you add your push sender account to the emulator?
hope this helps!

Related

Android Boot Completed Receiver doesn't work on system app

My application contains a BOOT_COMPLETED receiver like described in other threads here. It works perfectly until I changed my app into a system application. Now the Receiver does not trigger the event anymore.
Any ideas for this issue? I'm using Android Kitkat 4.4.2 on a Radxa Rock Pro. Compiled my own image to register the app as system application.
we need more detail to help you, post the code and the manifest, also debug log, in other hand you must use Log.i(TAG, "onReceive."); to know if the problem is in onReceive() or when trying to run the service class.

AVD blackscreen after enableLocalDatastore

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

Start Android Service on boot time Android 4.0

I'm triying to start a android service in android 4.0 when the device is booting, in boot time, but it's imposible , I had be used many codes, copy and paste. I had used code from here, stackoverflow of others examples and questions , but for me is imposible. I'm using android 4.0.1 in a table Acer Iconia A501. I put my code here. Somebody Can it try this code??? this is the page :This page please, it is easy
You need to register a broadcast receiver for the intent that is broadcast on startup. There is ZERO doubt that this is what you need to do.
See: BroadcastReceiver not receiving BOOT_COMPLETED
You need to do the same. Register a broadcast receiver and first make sure that you are catching the BOOT_COMPLETED event. Then its just a matter of doing a startService.
The problem is most likely in the Manifest. Check that you have exactly the right name for everything. Note the . in names like .MyBroadcastReceiver These are important. Missing just one thing will cause a problem.
Both the Receiver and Service definition must be perfect. Also check logcat and tell us what errors are there.

Android Service application error - no launcher activity

I created a service application without any GUI...infact take help of other applications available on this website...but when i try to run it on my Emulator (2.3.3), I keep on getting error:
2012-02-13 17:36:56 - RUN_SERVICE] No Launcher activity found!
[2012-02-13 17:36:56 - RUN_SERVICE] The launch will only sync the application package on the device!
After it installs properly, but i dont see my service running...i tried adding toast messages, but I am not receving that as well...i didnt try it on real device yet...as I didnt have any phone with this android version 2.3.3. I am using jre6
As your applicatinon does not have any GUI.
You must start the Service from at least one activivity that may be lanucher acitivity by using
<category android:name="android.intent.category.LAUNCHER>
So that your Service need to start when the app is installed or Run.
Make sure you have defined the activity in your AndroidManifest.xml file....
I think you mentioned this in your manifest <category android:name="android.intent.category.LAUNCHER>. if yes then remove this

Sending data to server when android application is unistalled

I would like to notify my server that the user deleted the application. How can I accomplish this?
Get application uninstall event in android
According to this post what you ask for is not possible. Are you by any chance using a C2DM implementation?
Unfortunately there is currently no way for an Android package to execute code when it is removed. However, you can register a BroadcastReceiver for ACTION_PACKAGE_REMOVED in a different package that will be called when packages are removed from the phone.
Also see this question.

Categories

Resources