question

tassine avatar image
tassine asked

failed to get registration ID: INVALID_SENDER

Hi everybody, I got api key for a release version through the following command: https://docs.google.com/file/d/0B0xYk7NLFSEpX2czbUIyc3FBSk0/edit?usp=sharing I set MD5 key in assets/ api_key.txt like that: https://docs.google.com/file/d/0B0xYk7NLFSEpekJ3emM5VnJET2s/edit?usp=sharing I failed to start registration, getting the following Alert message : Amazon Device Messaging (ADM) has stopped. and get the following exception: CRASH HAS OCCURRED com.amazon.dcp.metrics.CrashDetectionHelper(6024): java.lang.RuntimeException: An error occured while executing doInBackground() com.amazon.dcp.metrics.CrashDetectionHelper(6024): at android.os.AsyncTask$3.done(AsyncTask.java:278) com.amazon.dcp.metrics.CrashDetectionHelper(6024): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273) com.amazon.dcp.metrics.CrashDetectionHelper(6024): at java.util.concurrent.FutureTask.setException(FutureTask.java:124) com.amazon.dcp.metrics.CrashDetectionHelper(6024): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307) com.amazon.dcp.metrics.CrashDetectionHelper(6024): at java.util.concurrent.FutureTask.run(FutureTask.java:137) com.amazon.dcp.metrics.CrashDetectionHelper(6024): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) com.amazon.dcp.metrics.CrashDetectionHelper(6024): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) com.amazon.dcp.metrics.CrashDetectionHelper(6024): at java.lang.Thread.run(Thread.java:856) com.amazon.dcp.metrics.CrashDetectionHelper(6024): Caused by: java.lang.IllegalArgumentException: Decoding fails: API Key must have 3 parts {header}.{payload}.{signature} com.amazon.dcp.metrics.CrashDetectionHelper(6024): at android.os.Parcel.readException(Parcel.java:1331) com.amazon.dcp.metrics.CrashDetectionHelper(6024): at android.os.Parcel.readException(Parcel.java:1281) com.amazon.dcp.metrics.CrashDetectionHelper(6024): at com.amazon.identity.auth.device.authorization.api.AmazonCredentialManagerServiceInterface$Stub$Proxy.getAppId(AmazonCredentialManagerServiceInterface.java:294) com.amazon.dcp.metrics.CrashDetectionHelper(6024): at com.amazon.identity.auth.device.authorization.api.AmazonCredentialManager$2.doTask(AmazonCredentialManager.java:96) com.amazon.dcp.metrics.CrashDetectionHelper(6024): at com.amazon.identity.auth.device.authorization.api.AmazonCredentialManager$BindAndDoTask.doInBackground(AmazonCredentialManager.java:528) com.amazon.dcp.metrics.CrashDetectionHelper(6024): at com.amazon.identity.auth.device.authorization.api.AmazonCredentialManager$BindAndDoTask.doInBackground(AmazonCredentialManager.java:1) com.amazon.dcp.metrics.CrashDetectionHelper(6024): at com.amazon.identity.auth.device.authorization.api.AbstractCredentialManagerAsyncTask.doInBackground(AbstractCredentialManagerAsyncTask.java:1) com.amazon.dcp.metrics.CrashDetectionHelper(6024): at android.os.AsyncTask$2.call(AsyncTask.java:264) com.amazon.dcp.metrics.CrashDetectionHelper(6024): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) someone can help me , please!
amazon device messaging
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tassine avatar image
tassine answered
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ethertree avatar image
ethertree answered
While I've not got the system working myself yet, the content of your api_key.txt file should be taken from your Security Profile on developers.amazon.com as detailed here https://developer.amazon.com/sdk/adm/credentials.html and then what goes in the raw api key you generated, as described here: https://developer.amazon.com/sdk/adm/integrating-app.html#Asset So the api_key.txt file should contain a single line with a very long alphanumerci most likely ending with == Hope that gets you further than me! Tree
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Bipin@Amazon avatar image
Bipin@Amazon answered
There are three things which is used to generate api_key 1)API key name : Provide a name to identify this key as belonging with this app. 2)Package :For example, com.mycompany.bestapp 3)Signature :This is the MD5 signature of the certificate you are using to sign your app. Create a security profile, Using the above three under security profile create a api key. steps: https://developer.amazon.com/sdk/adm/credentials.html#Getting We should not use MD5 as api key. Hope this solves the issue.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.