03-05-2013 05:40 AM
We had this error (SessionAlreadyExists = 10112) once on a device. The same app with the same APP_ID and PPG URL works without error, normally.
So the api doc of this error doesn't explain for what reason this error could occur.
Can someone give me a more detailed explaination of this error.
The app creates a session on startup. So this should just called once in the app lifecycle. Also there is no destroySession method. So how should we respond to this error? And don't forget it just occured once.
03-05-2013 05:44 AM
I just got some new information...
When the error occured two versions of the same app (slightly different) have been installed on the device. Could this be the source of the error?
03-05-2013 09:12 AM
Sorry I should also say the provider application ID and target key pair you specify in the PushService constructor must be unique on the device. If another application has already registered with that pair you will get the 10112 error code when you try and create the session. Again, your best bet if you want two push-enabled applications on the device is to get a unique provider application ID for each.
There is no destroy session API because it is not required. As I mentioned applications should each have their own unique provider application ID. Create session should be called on the start up of your application. It does not need to be destoryed and will be closed automatically when the user closes the application.
It's also worth mentioning if both your applications share the same package id (this can be found in your .bar file /META-INF/MANIFEST.MF file) you will also get this error. Typically package id's are auto generated and unique per application, however, it is possible for users to override the <packageId> specified in the bar-descriptor.xml which may cause an issue if the same value is chosen.