Native Android Inapp Purchase Where to Configure Base64-encoded RSA License Key?











up vote
1
down vote

favorite












I am implementing inapp purchase in my native android app. I am following code same as given at https://developer.android.com/google/play/billing/billing_library_overview .
But where I want to configure the Base64-encoded RSA License key? This reference not specifies about this configuration. Could anybody please help me?



Thanks










share|improve this question






















  • What do you mean, exactly, by "configuring" the key? What file you can change it in?
    – daedsidog
    Nov 11 at 11:16












  • I meant license key for the application that is taking from Services & APIs section in Play Store Console. That is a string(Base64-encoded RSA public key) to include in the binary. Where I want to set this string in the Application please?
    – Tony
    Nov 11 at 16:17















up vote
1
down vote

favorite












I am implementing inapp purchase in my native android app. I am following code same as given at https://developer.android.com/google/play/billing/billing_library_overview .
But where I want to configure the Base64-encoded RSA License key? This reference not specifies about this configuration. Could anybody please help me?



Thanks










share|improve this question






















  • What do you mean, exactly, by "configuring" the key? What file you can change it in?
    – daedsidog
    Nov 11 at 11:16












  • I meant license key for the application that is taking from Services & APIs section in Play Store Console. That is a string(Base64-encoded RSA public key) to include in the binary. Where I want to set this string in the Application please?
    – Tony
    Nov 11 at 16:17













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am implementing inapp purchase in my native android app. I am following code same as given at https://developer.android.com/google/play/billing/billing_library_overview .
But where I want to configure the Base64-encoded RSA License key? This reference not specifies about this configuration. Could anybody please help me?



Thanks










share|improve this question













I am implementing inapp purchase in my native android app. I am following code same as given at https://developer.android.com/google/play/billing/billing_library_overview .
But where I want to configure the Base64-encoded RSA License key? This reference not specifies about this configuration. Could anybody please help me?



Thanks







java android in-app-purchase






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 11 at 10:45









Tony

3019




3019












  • What do you mean, exactly, by "configuring" the key? What file you can change it in?
    – daedsidog
    Nov 11 at 11:16












  • I meant license key for the application that is taking from Services & APIs section in Play Store Console. That is a string(Base64-encoded RSA public key) to include in the binary. Where I want to set this string in the Application please?
    – Tony
    Nov 11 at 16:17


















  • What do you mean, exactly, by "configuring" the key? What file you can change it in?
    – daedsidog
    Nov 11 at 11:16












  • I meant license key for the application that is taking from Services & APIs section in Play Store Console. That is a string(Base64-encoded RSA public key) to include in the binary. Where I want to set this string in the Application please?
    – Tony
    Nov 11 at 16:17
















What do you mean, exactly, by "configuring" the key? What file you can change it in?
– daedsidog
Nov 11 at 11:16






What do you mean, exactly, by "configuring" the key? What file you can change it in?
– daedsidog
Nov 11 at 11:16














I meant license key for the application that is taking from Services & APIs section in Play Store Console. That is a string(Base64-encoded RSA public key) to include in the binary. Where I want to set this string in the Application please?
– Tony
Nov 11 at 16:17




I meant license key for the application that is taking from Services & APIs section in Play Store Console. That is a string(Base64-encoded RSA public key) to include in the binary. Where I want to set this string in the Application please?
– Tony
Nov 11 at 16:17












1 Answer
1






active

oldest

votes

















up vote
0
down vote













Whenever you initialise in-app billing, you have to supply the constructor with an encoded public key that is associated with your GP Console account:



mHelper = new IabHelper(this, base64EncodedPublicKey);



If you would try to run your app without doing this, you would get a warning telling you to change the default value of base64EncodedPublicKey, assuming you are using the demo examples available from Google.



It's also good practice to do the best you can to obfuscate your code using things like ProGuard.



EDIT: It looks like this is a newer method of implementing billing than what I used. From what I can understand it seems that you can optionally use the key using the getOriginalJSON() method to verity a purchase, but it is not used in the sample code so I can only assume it isn't mandatory.






share|improve this answer























  • Thanks. But I am using the code given at developer.android.com/google/play/billing/… . There is no IabHelper or option to provide key as I mentioned in my question.
    – Tony
    Nov 13 at 6:34






  • 1




    It looks like this is a newer method of implementing billing than what I used. From what I can understand it seems that you can optionally use the key using the getOriginalJSON() method to verity a purchase, but it is not used in the sample code so I can only assume it isn't mandatory.
    – daedsidog
    Nov 13 at 10:39










  • Yes. Me also think so now. Today I tested one inapp purchase with my account and it was success. Also i published in Play Store and started getting inapp sales. Thanks for help :)
    – Tony
    Nov 13 at 15:33











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53247960%2fnative-android-inapp-purchase-where-to-configure-base64-encoded-rsa-license-key%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













Whenever you initialise in-app billing, you have to supply the constructor with an encoded public key that is associated with your GP Console account:



mHelper = new IabHelper(this, base64EncodedPublicKey);



If you would try to run your app without doing this, you would get a warning telling you to change the default value of base64EncodedPublicKey, assuming you are using the demo examples available from Google.



It's also good practice to do the best you can to obfuscate your code using things like ProGuard.



EDIT: It looks like this is a newer method of implementing billing than what I used. From what I can understand it seems that you can optionally use the key using the getOriginalJSON() method to verity a purchase, but it is not used in the sample code so I can only assume it isn't mandatory.






share|improve this answer























  • Thanks. But I am using the code given at developer.android.com/google/play/billing/… . There is no IabHelper or option to provide key as I mentioned in my question.
    – Tony
    Nov 13 at 6:34






  • 1




    It looks like this is a newer method of implementing billing than what I used. From what I can understand it seems that you can optionally use the key using the getOriginalJSON() method to verity a purchase, but it is not used in the sample code so I can only assume it isn't mandatory.
    – daedsidog
    Nov 13 at 10:39










  • Yes. Me also think so now. Today I tested one inapp purchase with my account and it was success. Also i published in Play Store and started getting inapp sales. Thanks for help :)
    – Tony
    Nov 13 at 15:33















up vote
0
down vote













Whenever you initialise in-app billing, you have to supply the constructor with an encoded public key that is associated with your GP Console account:



mHelper = new IabHelper(this, base64EncodedPublicKey);



If you would try to run your app without doing this, you would get a warning telling you to change the default value of base64EncodedPublicKey, assuming you are using the demo examples available from Google.



It's also good practice to do the best you can to obfuscate your code using things like ProGuard.



EDIT: It looks like this is a newer method of implementing billing than what I used. From what I can understand it seems that you can optionally use the key using the getOriginalJSON() method to verity a purchase, but it is not used in the sample code so I can only assume it isn't mandatory.






share|improve this answer























  • Thanks. But I am using the code given at developer.android.com/google/play/billing/… . There is no IabHelper or option to provide key as I mentioned in my question.
    – Tony
    Nov 13 at 6:34






  • 1




    It looks like this is a newer method of implementing billing than what I used. From what I can understand it seems that you can optionally use the key using the getOriginalJSON() method to verity a purchase, but it is not used in the sample code so I can only assume it isn't mandatory.
    – daedsidog
    Nov 13 at 10:39










  • Yes. Me also think so now. Today I tested one inapp purchase with my account and it was success. Also i published in Play Store and started getting inapp sales. Thanks for help :)
    – Tony
    Nov 13 at 15:33













up vote
0
down vote










up vote
0
down vote









Whenever you initialise in-app billing, you have to supply the constructor with an encoded public key that is associated with your GP Console account:



mHelper = new IabHelper(this, base64EncodedPublicKey);



If you would try to run your app without doing this, you would get a warning telling you to change the default value of base64EncodedPublicKey, assuming you are using the demo examples available from Google.



It's also good practice to do the best you can to obfuscate your code using things like ProGuard.



EDIT: It looks like this is a newer method of implementing billing than what I used. From what I can understand it seems that you can optionally use the key using the getOriginalJSON() method to verity a purchase, but it is not used in the sample code so I can only assume it isn't mandatory.






share|improve this answer














Whenever you initialise in-app billing, you have to supply the constructor with an encoded public key that is associated with your GP Console account:



mHelper = new IabHelper(this, base64EncodedPublicKey);



If you would try to run your app without doing this, you would get a warning telling you to change the default value of base64EncodedPublicKey, assuming you are using the demo examples available from Google.



It's also good practice to do the best you can to obfuscate your code using things like ProGuard.



EDIT: It looks like this is a newer method of implementing billing than what I used. From what I can understand it seems that you can optionally use the key using the getOriginalJSON() method to verity a purchase, but it is not used in the sample code so I can only assume it isn't mandatory.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 13 at 20:41

























answered Nov 11 at 18:05









daedsidog

437522




437522












  • Thanks. But I am using the code given at developer.android.com/google/play/billing/… . There is no IabHelper or option to provide key as I mentioned in my question.
    – Tony
    Nov 13 at 6:34






  • 1




    It looks like this is a newer method of implementing billing than what I used. From what I can understand it seems that you can optionally use the key using the getOriginalJSON() method to verity a purchase, but it is not used in the sample code so I can only assume it isn't mandatory.
    – daedsidog
    Nov 13 at 10:39










  • Yes. Me also think so now. Today I tested one inapp purchase with my account and it was success. Also i published in Play Store and started getting inapp sales. Thanks for help :)
    – Tony
    Nov 13 at 15:33


















  • Thanks. But I am using the code given at developer.android.com/google/play/billing/… . There is no IabHelper or option to provide key as I mentioned in my question.
    – Tony
    Nov 13 at 6:34






  • 1




    It looks like this is a newer method of implementing billing than what I used. From what I can understand it seems that you can optionally use the key using the getOriginalJSON() method to verity a purchase, but it is not used in the sample code so I can only assume it isn't mandatory.
    – daedsidog
    Nov 13 at 10:39










  • Yes. Me also think so now. Today I tested one inapp purchase with my account and it was success. Also i published in Play Store and started getting inapp sales. Thanks for help :)
    – Tony
    Nov 13 at 15:33
















Thanks. But I am using the code given at developer.android.com/google/play/billing/… . There is no IabHelper or option to provide key as I mentioned in my question.
– Tony
Nov 13 at 6:34




Thanks. But I am using the code given at developer.android.com/google/play/billing/… . There is no IabHelper or option to provide key as I mentioned in my question.
– Tony
Nov 13 at 6:34




1




1




It looks like this is a newer method of implementing billing than what I used. From what I can understand it seems that you can optionally use the key using the getOriginalJSON() method to verity a purchase, but it is not used in the sample code so I can only assume it isn't mandatory.
– daedsidog
Nov 13 at 10:39




It looks like this is a newer method of implementing billing than what I used. From what I can understand it seems that you can optionally use the key using the getOriginalJSON() method to verity a purchase, but it is not used in the sample code so I can only assume it isn't mandatory.
– daedsidog
Nov 13 at 10:39












Yes. Me also think so now. Today I tested one inapp purchase with my account and it was success. Also i published in Play Store and started getting inapp sales. Thanks for help :)
– Tony
Nov 13 at 15:33




Yes. Me also think so now. Today I tested one inapp purchase with my account and it was success. Also i published in Play Store and started getting inapp sales. Thanks for help :)
– Tony
Nov 13 at 15:33


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53247960%2fnative-android-inapp-purchase-where-to-configure-base64-encoded-rsa-license-key%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Bressuire

Vorschmack

Quarantine