|ID|1|: added to deviceToken on parse.com and android - android

I'm using parse.com to send push notifications to android devices and it worked once and it registered the device's deviceToken correctly but suddenly it started adding |ID|1|: at the beggining and the notifications don't get to the devices that have that and they do to the ones that were already there.
I don't remember changing anything and I don't have any idea where that came from.

According to the documentation You should call ParseInstallation.getCurrentInstallation().saveInBackground() as soon as possible (after Parse.initialize()).
Are You sure this is the solution? It seems for me that is not connected in any way.

Turns out I was calling ParseInstallation.getCurrentInstallation().saveInBackground() before ParsePush.subscribeInBackground(...) in my Application subclass.
So I changed the order to
Parse.initialize(this, appId, clientKey);
ParsePush.subscribeInBackground(...);
ParseInstallation.getCurrentInstallation().saveInBackground();
and it started saving all the deviceTokens correctly.

Related

Background call receiving in using IMSdroid voip

Thanks in advanced, I am using imsdroid library in my app. calling feature work fine, but i am unable to receive call when app is closed.When I minimize application it works but when i clear application from recent app it can't receive call. What is solution for this issue, please help me out. or provide some reference links.
According to me, IMSdroid does not provide this functionality. You have to open your application while dealing with them. I got same issue:
https://code.google.com/p/imsdroid/issues/detail?can=2&q=491&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&id=491
finally resolved it with some customization.
#nik u r right. it is not possible to keep registered all the time.in that case u have to notify the second person when first client tries to make him a call ,and when second client will get notification, then fire a broadcast to start the NativeService. this will register the device. and finally u will get the incoming call.

Android Wear: getDataItems returns 0 items

Here is a big problem that i simply don't know whats going on...
I have an app that stores Data in data API. The mobile app is aroudn the play store for some time and I decided to make a app for wearable.
My problem is: when the user install the wearable app for the first time (via Google Play), it need to load the data from the DataApi. But it simple returns 0 itens!
DataItemBuffer dataItems = Wearable.DataApi.getDataItems(mGoogleApiClient).await();
Observations:
GoogleApiClient IS CONNECTED
The Wearable receives the onDataChanged from WearableListenerService and this part is working fine.
I've already tested with .setResultCallback but results still the same.
I have two copmuter for developments, one is one my work and another is on my home.
In my tests, I DELETE the emulator and create a new one, to simulate a "new device beeing connected for the first time".
DataAPI says that the data is synchronzed to all devices but is seems not be working like that. How to solves this? Any workaround? SOMEONE HELP =(
It seems i found the solution for this problem. As I mentioned i have two computers for development, so, 2 development keys.
My mobile app was installed using the "A" computer's key and the wearable was using the "B" one. So, to solve this problem, when start developing always remember to re-run the mobile and wearable app from the same computer to your devices.

Custom receiver connection failed

I have an Android app, working with a custom receiver. It was working without problem, but with the release of the new cast companion library, I decided to upgrade it, as well as my Play services version.
Anyway, when I try to connect to Chromecast, my custom receiver HTML page is displayed. But then, I can't connect and send data to it. After a while (something like 15 seconds), the app exits on the Chromecast.
Then, I've tried to get the Cast Hello Text sample to work, using the same app id. Same problem here.
Here is the code I use to launch the Cast app:
Cast.CastApi.launchApplication(mApiClient, getString(R.string.app_id), true)
The result I receive in the ResultCallback, is a status with code 15, with isSuccess method returning false.
The problem doesn't seem to come from my Chromecast, since other users have the exact same issue.
Thanks for your help!

C2DM handle registration properly

I want to use C2DM in my android application. I am using code schemas shown in official tutorials. Everything seems to work fine, but I have problem with handling registration properly.
There are 2 methods in C2DMMessaging class which I have to use: firstly register() and next getRegistrationID(). If I use them sequentially, I get null form the getRegistrationID(). The problem is registration is asynchronous. In my application in the beginning I need to know the regidtrationId, I can start the rest of the app only after I get it.
I tried to do some synchronization using monitors (i.e. wait() in register method and notify() in C2DMReceiver.onRegistered()), but it didn't work (the code of onRegistered() hasn't been reached, after calling wait() in register()).
In other words what I need is making registration synchronous, so I could continue, only after I get registrationId. What is the right way to do it?
Make sure you are following below guidelines:
To develop and test on the Android Emulator, you need to download the Android 2.2 version of the Google APIs Add-On into your SDK.
Make sure you set android:minSdkVersion="8" in the manifest.
Make sure you have at least one Google account synced on your emulator or device.

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