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

5 posts, 0 answers
  1. Ryan
    Ryan avatar
    5 posts
    Member since:
    May 2013

    Posted 05 Nov 2013 Link to this post

    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
  2. Iva Koevska
    Admin
    Iva Koevska avatar
    286 posts

    Posted 06 Nov 2013 Link to this post

    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.
  3. Ryan
    Ryan avatar
    5 posts
    Member since:
    May 2013

    Posted 06 Nov 2013 Link to this post

    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? 
  4. Iva Koevska
    Admin
    Iva Koevska avatar
    286 posts

    Posted 07 Nov 2013 Link to this post

    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.
  5. Ryan
    Ryan avatar
    5 posts
    Member since:
    May 2013

    Posted 08 Nov 2013 Link to this post

    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.
Back to Top