This is currently not working now. Please check todo queue via spectator https://spectator-g7g.amazon.com/FionaSpectatorService/InspectFiona.jsp
Java docs can be found here.
For eng builds this is the Amazon debug key https://improvement-ninjas.amazon.com/s3files/s3get.cgi/debug.keystore. For userdebug and user builds, this is the amazon release key, which is protected and you can only get signed with if you go through the nightly build. This also means that all development must be done on an eng build, so you can be signed with the correct key. Android has a good document about signing
You need to be signed with amazon key.
It is not uncommon for people to get an error like:
UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: already added: Lcom/amazon/dcp/common/BuildInfo; [2012-01-11 21:47:17 - TailwindAndroidSDK] Dx at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123) [2012-01-11 21:47:17 - TailwindAndroidSDK] Dx at com.android.dx.dex.file.DexFile.add(DexFile.java:143) [2012-01-11 21:47:17 - TailwindAndroidSDK] Dx at com.android.dx.command.dexer.Main.processClass(Main.java:372) [2012-01-11 21:47:17 - TailwindAndroidSDK] Dx at com.android.dx.command.dexer.Main.processFileBytes(Main.java:346) [2012-01-11 21:47:17 - TailwindAndroidSDK] Dx at com.android.dx.command.dexer.Main.access$400(Main.java:59)
There are a couple reasons that this can occur:
With your device connected via usb, type in your console:
adb root adb shell am broadcast -a com.amazon.intent.SYNC
Settings > Applications > Sync All
Make sure you have a server-side endpoint set up. To get started to use device-to-server message to deliver messages, follow the wiki to register the topic before testing device-to-server message in Prod. https://w.amazon.com/index.php/Digital/Delivery/Messaging/Consumers#Getting_Started
In order for metrics to show up in PMET, a few things need to happen:
120419:221509 LogCat: I Amzn:com.amazon.dcp.metrics.CentralDeviceMetricsCollector::[p=817:t=2032] RecordTiming: (I) DCP:WebserviceCall:WebserviceCallTime:registerDevice=1483
Log.i("metrics.resmon", "hotspottemp:def:temp=35515,testName=testCounter:")becomes
I/resmon ( 215): hotspottemp:def:temp=35515,testName=testCounter:. The integer counter ("resmon:hotspottemp:def:temp") can be viewed and aggregated easily using PMET . The string counter ("resmon:hotspottemp:def:testName") cannot be viewed and aggregated easily via PMET. Instead, a custom EMR query must be written (this is currently not up and running).
By default, metrics and logs recording are on. If you do not want to record metrics and logs at all, do the following:
Make sure to exit Beta App for this to take effect. After turning off logs recording, you will still see logs on logcat, but they are not being captured.
The two main reasons that a device is not updating is that it is either not in the right "OTA Pool" (sets of devices that receive certain OTAs) or it is currently not in the correct state to get an OTA.
To check if your device is in the right pool to get an update, first do a manual sync. After this verify in Todo that an OTA GET Todo Item was produced (remember to check current, completed, or failed todo items) and make sure there is a todo item with an insertion time of when you last synced. If no item was produced you are not in the right OTA pool (unless you happen to be on the latest build).
You should contact otter-ota@ and ask for your device to be added to a pool.
The information you should provide is:
The high level OTA flow is that it downloads the OTA update, waits for a non-intrusive time to install (so user does not notice the update) and for the device to be in a state where it can do an OTA update (proper disk space, battery, and etc), and then installs.
To make sure that the device has downloaded or is currently downloading an update, you can use the OTA Status Tool. For this simply type ';dx' in launcher search bar. A UI should pop up with your device OTA history. Now follow these steps:
Sideload your new build, then factory reset. The factory reset is important; Android has bugs that cause spurious permission denials if you don't. Note that because of version-numbering conventions for the different build flavors, if you're trying to go from user/userdebug -> eng of the same build, that is technically a downgrade and you'll have to enable downgrading.
It has its own wiki: Kindle/DCP/IndividualAppUpdates.
Infinite hang means you need the permission com.amazon.dcp.settings.permission.READ_SETTINGS
This basically boils down to you not having the same certificate as DCP. Make sure you are properly signed. If you know your application has been properly signed, but you recently changed build flavors (for example: userdebug->eng), you must do a factory reset since android caches certificates and does not properly change them during an upgrade.
The answer is basically that you should use the Central Device Type unless there is a good reason not too. The central device type is easier from a programmatic standpoint and is better also for device and server scaling.
Some good reasons for using a sub authenticator are:
No, You can delete all of it. This includes the xml resources files, sub authenticator classes, and services.
com.amazon.dcp.sso.action.account.added
com.amazon.dcp.sso.action.account.removed
.
com.amazon.dcp.sso.permission.account.changed
Here is a code sample:
AccountManager acctMan = AccountManager.get(Main.this); AccountManagerFuture<Bundle> resultFuture = acctMan .addAccount(AccountConstants.AMAZON_ACCOUNT_TYPE, null, null, null, null, null, null); try { Bundle result = resultFuture.getResult(); Intent addAccount = result.getParcelable(AccountManager.KEY_INTENT); startActivity(addAccount); } catch (OperationCanceledException e) { // handle exception } catch (AuthenticatorException e) { // handle exception } catch (IOException e) { // handle exception }
AmazonAccountManager.hasAmazonAccount() returns true if there is a primary Amazon account registered to this device.
See full documentation in our java doc here
Note: If you are also trying to get the primary account, use AmazonAccountManager.getAmazonAccount.
The following will NOT guarantee to return the primary account.
Account[] accounts = AccountManager.get(this.context).getAccountsByType(AccountConstants.AMAZON_ACCOUNT_TYPE);
Account amznAccount = accounts[0];