I have been able to successfully develop an application that uses Facebook SSO with a debug key. When I released the app for testing the Facebook SSO no longer works. I need a new Facebook Key that is not a debug key. My problem is, I do not know how to generate it. Any help would be much appreciated.
I am using windows 7 and eclipse.
Here is what you do to create a new key and to sign your app for distribution.
1) Right-click on your project in the Package Explorer section of Eclipse and select Android Tools > Export Signed Application Package...
2) Go through the wizard, make sure your project is selected as the one to export
3) Next step is to create a new keystore. Specify the path and what you want the password to be
4) You can change the alias if you want, but default is "android" which is sufficient. Set a password for this alias, set the validity of this key (between 0-1000 years), and at least your first and last name. You can also add any other details you want associated with this key (not required, however).
5) Finish the procedure by specifying the path to where you want to export your APK to be. Press Finish, Eclipse will take a while to package your app. Once it's done, you'll have your new key at the path you specified, as well as an APK file signed by that new key.
Let me know if that helps!
Related
My app uses Google Sign In and this requires a package name and SHA-1 fingerprint in order to enable the Google Sign In for the app and get the json configuration file. Naively, since it was a work in progress, I used the SHA-1 from the debug keystore, rather than a production key. I can't seem to change the SHA-1 associated to the app and the Google Sign In service now.
What are my options here? One I've considered is changing the package name for the app, and regenerating the configuration file.
You don't need to change package name!
Go to cloud.google.com
Choose APIs and Services from the menu at the left
Choose credentials
Choose the OAuth 2.0 client id you want to change, eg "Android client 1"
Click on the thing that looks like a pencil to edit it
Edit the signing certificate, and click save
OR alternatively, at step 4 just add a new client id with the same package name but a different certificate if you want both debug and production to work.
To my knowledge I do not think there is a way to change the value once you have put it in, so changing the package name and regenerating your configuration file is the safe and easy way to go. Let me know if that works out!
I got APK file from my developer saying that, that is all I need. I've been stuck in the part of signing the app. I have read through the articles and from what I understand I need a .ks file or private key to finish the procedure.
I'm not sure if I understand the app signing process or should I download Android studio to sign the app manually.
If the developer has signed the app, what is my procedure henceforth? Would I need a keystore file?
Presuming apk has been signed by the developer.
Step one:
go to the play console:
https://developer.android.com/index.html login to the account you would like to use to publish your app.
Step two:
Once logged in hit the 'create application' button set the default languade & title.
Step three:
complete the form, this is your store listing, which includes images, app description, app name etc.
Step four:
go to the app releases tab, then to 'production', accept T&C, you will then see a button that says 'upload apk' click that button then use the apk file that has been provided by the developer, complete the rest of the form which will complete uploading your app.
On Android studio, I have fully completed my code and have tested it on my physical device. I have not generated an apk file yet. I have searched around on StackOverflow and all I know now is that I need to export signed to release it on the play store. Now I'm staring at a form not knowing what anything does.
Someone explain please
EDIT: The solution --> developer.android.com/studio/publish/app-signing.html
You have to create a new keystore to use when signing...there is a "Create New" button on that form.
Once you have created the keystore, you will know the information to use to complete this form(make sure you keep track of that, once you have signed you app with this keystore, and uploaded to the Play store, it is permanent, if you forget it you will be in trouble).
In the menu bar, click Build > Generate Signed APK.
Select the module you would like to release from the drop down, and click Next.
On the New Key Store window, provide the following information for your keystore and key.
Keystore
Key store path: Select the location where your keystore should be created.
Password: Create and confirm a secure password for your keystore.
Key
Alias: Enter an identifying name for your key.
Password: Create and confirm a secure password for your key. This
should be different from the password you chose for your keystore
Validity (years): Set the length of time in years that your key will
be valid. Your key should be valid for at least 25 years, so you can
sign app updates with the same key through the lifespan of your app.
Certificate: Enter some information about yourself for your
certificate. This information is not displayed in your app, but is
included in your certificate as part of the APK.
Once you complete the form, click OK.
On the Generate Signed APK Wizard window, select a keystore, a
private key, and enter the passwords for both. (If you created your
keystore in the last step, these fields are already populated for
you.) Then click Next.
On the next window, select a destination for the signed APK(s),
select the build type, (if applicable) choose the product
flavor(s), and click Finish.
Go to Buid (menu bar) -> Generate Signed APK and follow the steps shown in the wizard.
Updating from my comment below:
Select a keystore if you have one else create one using the provided button. Enter the passwords in this window again (same as ones you provide when creating the keystore). Make sure you select a date in far future for the certificate validity otherwise you'll not be able to sign your apk after the certificate expires
I have a keystroke from google for my app. When I try to Export signed application package from eclipse, it gives me an option to either create a new keystore or to use an existing one.
As per my understanding I must use the "Base64-encoded RSA public key" that I got from Google. But there is no way I can download the key directly from the page where google displays it for me.
Can someone please let me know if I have to import it in someway or am I missing something?
Or should I just copy paste the key to some (binary) file in my project? Please help!
I have a keystroke from google for my app.
But there is no way I can download the key directly from the page where google displays it for me.
Which page is that? You shouldn't download a key in order to sign your application.
Or do you mean the debug.keystore which comes with the installation of the Android bundle? You can use it during development, but you need to create your own key when releasing the App. (Google Play won't accept an apk signed with the debug keystore)
If you are not releasing yet and you want to use the debug keytore - search your system for 'debug.keystore'. On Windows it can be in:
C:\Users\USERNAME\.android\debug.keystore
The passwords for the keystore and the android alias are android.
If however you want to create a new key for yourself - you can do that using the provided keytool as described here.
Finally, if you need an additional key for accessing some Google API (eg. Maps) with your App, then from the online developer console you need to create an additional Android key with the same fingerprint, as the one that you are signing the App with. This additional key is typically included in your manifest after that.
For reference, you can create new keys for your App here: https://console.developers.google.com
Is there a way I can provide the signed key to the builder and let the app build and install onto my device using the signed key directly? or I have to export the app manually and choose the key, enter the password, and then install it on my device manually?
So simply the question is: is there a way to use signed key while building app in eclipse (Which automatically installs it on device)?
Please notice: I'm not asking asking about how to debug it, I just need to run it directly from eclipse to device with signed key.
I have never done it but according to the docs you can. You have to configure it to run that way by giving it a path to the keystore and the password. But it looks like once you get it set up then it will be easy and do what you need.
Run in release mode
Here is also a SO post about it.