This is a migrated thread and some comments may be shown as answers.

Finding the Android SHA-1 fingerprint or keystore for an Icenium app

4 Answers 331 Views
AppBuilder Windows client
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ryan
Top achievements
Rank 1
Ryan asked on 05 Nov 2013, 10:00 PM
Hey Icenium Team,

I'm trying to set up google cloud messaging in my Icenium app, and I need to include the app in the GCM console. It's asking me for the SHA-1 fingerprint, and says it can be found by using the java keytool with the app's keystore. I'm not sure where to find the Keystore of my app, though, or if there's a way to get the SHA-1 fingerprint directly. 

Thanks!
Ryan

4 Answers, 1 is accepted

Sort by
0
Iva Koevska
Telerik team
answered on 06 Nov 2013, 08:16 AM
Hello Ryan,

Here's what you need to do.

  1. Verify that you have the latest JDK installed on your system.
  2. In Graphite, open the User Options. (In the title bar, click Welcome, User Name -> Options).
  3. Go to General -> Certification Management.
  4. In the Cryptographic Identities panel; select your Google Play cryptographic identity. If you do not have one, create it.
  5. Click Export to export the cryptographic identity, set a password for it, and store it on your local file system.
  6. Run a command prompt and navigate to the location where you exported the cryptographic identity.
  7. Run the following command:
     keytool -exportcert -alias "Certificate Alias" -keystore "Exported Certificate File Name.p12" -storepass "Password" -storetype PKCS12 -list -v

    Make sure to replace "Cryptographic Identity Alias" with the alias as listed in Graphite, "Exported Certificate File Name.p12" with the complete file name of the exported identity, and "Password" with the password you set for the exported file. 

 In the command prompt, Keytool will generate the SHA-1 for the cryptographic identity. In Graphite, when building your app from the Publish operation, make sure to use this cryptographic identity for which you just generated SHA-1.

Regards,
Iva Koevska
Telerik
You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
0
Ryan
Top achievements
Rank 1
answered on 06 Nov 2013, 07:23 PM
Thanks! That helped me get the SHA-1 key. However I now have a different issue. When the following line is executed in the PushNotification.js

cordova.exec(successCallback, errorCallback, "PushPlugin", "register", [options]);


nothing seems to be happening. The successCallback function and the errorCallback function are never called. I can't check the log since it's on an android device, and the pushplugin feature isn't available in the simulator. Is there a way to see the console, or otherwise debug why this isn't doing anything? 
0
Iva Koevska
Telerik team
answered on 07 Nov 2013, 06:56 AM
Hello Ryan,

Could you try building your app from the Publish menu and deploy it on device? When your app is built from the Build or Build and Deploy menus, it is signed with a generic code signing identity (that you cannot modify and you cannot access). This generic identity does not match the SHA-1 you have registered for the app. This might be one of the possible issues at this point.

As for debugging, you might want to try using a third-party tool. You can check out these posts from our blog for pointers and walkthroughs:

Regards,
Iva Koevska
Telerik
You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.
0
Ryan
Top achievements
Rank 1
answered on 08 Nov 2013, 09:16 PM
Iva,

I will try the Publish menu approach, but if the SHA-1 was incorrect, wouldn't the cordova.excec function call the errorCallback function? Plus, for the time being, I opened the GCM project to accept any app, and removed the SHA-1 restriction.

Also, I already am able to log data using a webservice call to a logging service that I wrote, but the problem is I can't access cordova's log, which is where I assume any js errors or crashes are being reported. I was hoping the cordova log might give me insight as to whether or not the cordova.exec function is not being executed successfully.
Tags
AppBuilder Windows client
Asked by
Ryan
Top achievements
Rank 1
Answers by
Iva Koevska
Telerik team
Ryan
Top achievements
Rank 1
Share this question
or