AndroidInAppBilling
AndroidInAppBilling copied to clipboard
PhoneGap Build support
Are there plans to submit this plugin to PhoneGap Build?
I see this was marked as an enhancement? What are the steps required to complete this? I'd be happy to contribute some time/effort...
Could you try to send the logo to them? The last time I tried I did not succeed because of a technical error.
Guillaume Charhon Co-founder & CTO | Arise.io E: [email protected] T: +33 6 41 69 69 37
On Thu, Jan 2, 2014 at 10:18 PM, Max Moore [email protected] wrote:
I see this was marked as an enhancement? What are the steps required to complete this? I'd be happy to contribute some time/effort...
— Reply to this email directly or view it on GitHubhttps://github.com/poiuytrez/AndroidInAppBilling/issues/31#issuecomment-31485448 .
Sorry, what logo do you mean?
https://build.phonegap.com/plugins/add
All you need to do is link to the repository I think.
Hi. I'm also looking forward for PG Build support.
You need an AdobeID or just sign in to PGB with yout Github account. Then go to https://build.phonegap.com/plugins/add and just link to a repo (as maxmoore14 said).
Maybe it's a problem that the actual plugin resides in the v3-directory.
@poiuytrez I'm pretty sure @bwin is correct. Can you fork v3 into its own repo? Looks like everything else should be ready to go.
I forked the repo, deleted v2, and submitted to PGBuild. It is currently waiting for review. But I just realized it is definitely going to fail because the base64EncodedPublicKey is hard coded into the java file. Any suggestions for how to fix this? I think there is a way to set the key in your config file like:
<gap:plugin name="com.mcm.plugins.androidinappbilling">
<param name="base64EncodedPublicKey" value="ABCD1234" />
</gap:plugin>
Just not sure exactly how to wire it up. Can anyone help?
Maybe we could provide the key to the javascript api but it would be very unsafe.
Yeah, an option, but I agree, not ideal. If we can get the parameter working, it would be safer I think. I posted questions for help on both the phonegap google group and the phonegap build community board. Cause I don't know how to make that work - but I have seen it done in other plugins.
Just had an idea... I read through the code and it looks like the license key is only used to verify purchases - for either a purchase action or a purchase query (which I assume is like a "restore" in iOS?).
Anyway, my plan is to verify purchases on my server. So what if I edit the code to gracefully just return purchases without verifying them and leave the key blank?
Don't worry about exposing a public key. When used for server authentication in SSL/TLS, the client may verify that the server's public key is received from the proper host (see http://developer.android.com/training/articles/security-ssl.html).
Any news on the ability to pass the license key as a parameter to the plugin in the configuration file, rather than as a resource which PGB cannot pick up?
I just submitted a pull request to enable using the plugin on Phonegap Build
I also noticed that the various inappbilling plugins available on PGB are actually forks of this one, some from people in this thread. This sounds like a waste of effort as they don't seem to be providing any additional value, so I would like to propose a coordinated effort to bring this plugin on PGB and get dismiss the clones. Unfortunately, it also seems that PGB has become a quite expensive platform for submitting plugins, as it is now required that you pay a monthly recurring fee in order to publish your plugins there.
I would be glad to merge any pull requests regarding PGB support.
Now that the pull request allowing the parameterization of the license key (thus introducing support for PGB) is merged, it would be nice if someone would publish it to the PGB plugins. As far as I can see there are several plugins published, but all of them are forks of this project. Publishing requires a license though.
I have just contacted the phonegap team to try to get a free account.
@poiuytrez If it's just about the Account, then I can do it.
@poiuytrez there are 2 changes that have to be made to enable PGBuild support:
1. change license-name in plugin.xml
the PGBuild config parser doesn't recognize it, if it's not just "MIT".
2. choose another plugin-id
original plugin id "com.smartmobilesoftware.inappbilling" is already taken on PGBuild. https://build.phonegap.com/plugins/707KikeReto/InAppPurchase-Android https://github.com/KikeReto/InAppPurchase-Android whoever uploads first is the owner of the plugin id. Also we can't use "com.smartmobilesoftware.inappbilling-pgbuild". I'm sorry for that, it happened while testing as the PGBuild-submit-plugin-interface is a bad joke...
(3.) this is optional, but I would strongly recommend it - restructure the project files
3.1 if you plan to develop v2 further (otherwise skip 3.1)
create a new branch "v2". switch to v2 branch. delete all top-level files except ".gitignore" and move all files from v2 to root dir. delete v2 and v3 dirs. then all v2-development would happen in the v2-branch. if you just move the files (with "git mv") then the history of the files stays intact.
(AFAIK you can always do that later, even if you have already made the "changes to v3" from the next chapter.)
3.2 changes to v3
delete all top-level files except ".gitignore" and move all files from v3 to root dir. delete v2 and v3 dirs.
now the master-branch only contains v3.
benefits
- we don't have 2 plugin.xml's for v3
- it's a cleaner repo (I'm not much of a githubber, so this may be just personal preference)
- you don't have to checkout ~~/install~~ v2 if you're just using v3 (that should be everybody?)
~~to clarify "install" in the last sentence: I know v2 won't be really installed, but the files would still be copied to any app just wanting to use v3. (That's not that big of a deal, but nonetheless I don't like it.)~~ I think I was wrong there.
(4.) tag releases in git
I'm actually not sure on this one, but I think the released versions of this plugin have to be tagged e.g. "v3.0.2" in git. On the other hand, it wouldn't hurt, even if it's not necessary for PGBuild.
outcome
Have a look at https://github.com/bwin/AndroidInAppBilling to see where this would lead. I would like to hear your feedback on this. I do not plan to keep this repo, it's just temporary.
If we fix at least the first two (minor) problems, I would be happy to submit your plugin to PGBuild. I think you should have the repo thats the source for PGBuild. Then I'm just the one who submitted it. If I clone your whole repo, it's the same thing already done by KikeReto (see 2.) and it would be my responsibility to keep the fork up-to-date.
I will send you a pull req that includes the changes in 1. and 3.2. For 2. you have to come up with a new plugin id.
Just FYI: last (and only) time I submitted a plugin to PGBuild I think it took 4+ weeks till they reviewed it...
@poiuytrez: Any ideas for a new plugin id? I know it's a PITA... What about "com.smartmobilesoftware.androidinappbilling" ?
When we have a new id, we should bump the version to 3.0.2 and add a git tag "v3.0.2". After that I will publish it on PGBuild.
com.smartmobilesoftware.androidinappbilling looks good. Could you handle the rename and test it? I still do not have any feedback from the phone gap team.
I have just created and pushed the tag.
@poiuytrez sorry for the late reply. I am really busy at the moment.
Could you handle the rename and test it?
The rename was already in the PR, it's merged, everything is ok.
About testing: Did you mean... a) test, if the new plugin id is available on PGBuild or b) test, if the plugin is still working as expected. If (a) then already done, the id is yours. But if (b) then still yes, but not this week (I have no demo project ready and a lot of work to do already). (But since we didn't change any code it should be ok.)
I also already submitted it to PGBuild. Status is "pending review". I report back if it's released. Will be at https://build.phonegap.com/plugins/1247 . But since it's not released, you get an error (for now) if you click the link. (Looks like the review process has gotten faster in the meantime. Expect 1-2 weeks.)
F*ck. I thought you could release new versions just by adding a new git tag (like "v9.9.9"). But it looks like you need me to publish updates to PGBuild. Don't get me wrong, it's ok that way, but I would have liked it better, if you could've done it independently.
@maxmoore14 correct me if I'm wrong. You know more about this than me. I have just 1 plugin and never needed to update it... (I think I have to resubmit the plugin after a version bump, right?)
Correct. Unfortunately the PGB process is very manual. Every tiny little change requires a completely new submission to and review by PGB. Which can take weeks.
Thanks for the quick reply.
My feeling is that with so much friction in publishing and keeping plugins up to date PGB won't go very far, but there don't seem to be many alternatives right now.
On Tue, Nov 4, 2014 at 6:33 PM, Benjamin Winkler [email protected] wrote:
Thanks for the quick reply.
— Reply to this email directly or view it on GitHub https://github.com/poiuytrez/AndroidInAppBilling/issues/31#issuecomment-61680638 .
:( hadn't even the sdk installed... or ant or jdk or anything... Checked at least that it still compiles. Sorry, hadn't even done that before.
@simoneb PGB should also allow private plugins. No review-process, no sharing, no delay(!), no nothing.
@bwin I meant (b).
By the way, I never got any reply from the Phonegap team. I sent them 2 emails telling them that I gave a lot to the community and that they should give me a free account to publish the plugin. It's a shame.
Plugin is now active. https://build.phonegap.com/plugins/1247
Use it on PGB with:
<gap:plugin name="com.smartmobilesoftware.androidinappbilling" version="3.0.2" />
BTW you cannot test IAB-functionality with draft apps anymore, see http://developer.android.com/google/play/billing/billing_testing.html#draft_apps
@poiuytrez if you need/want to release an update just mention me. And shame on me, I still didn't have time to test it...