Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I would like to sell the compiled binary of my android application in the Google Play Store when it reaches production.

Which license can I use to prevent people from downloading my source code from the open-source page and selling an exact copy of my work on the play store?

I want the code to be free and open for geeks/hackers to download and play with, but I don't want people who check out my source code to have the ability to use it for commercial use.

share|improve this question
add comment

2 Answers

up vote 12 down vote accepted

See this excellent answer on SO. If your question is "how can I provide source but restrict commercial use", you have the following options:

  • GPL or similar copy-left licenses. In practice, this tends to work against commercial selling of of the software by anybody, including yourself. The reason is that since anyone can rebuild the software, anyone can - relatively easily - provide free binaries, undercutting anyone selling it, including yourself. On the plus side, GPL is very well understood and accepted, including the practice of having the original author selling copies without others selling it too. Another option is to provide the software free but sell something that others don't get just from the source: your expertise and support.
  • Don't provide important assets or some other form of crippling the source distribution. This is a very common practice, usually done to protect companies' IP, but also adhering to most of the spirit of open source, that of allowing hobbyists to tinker and study. Omitting the assets (or using a non-commercial license for them) is just one of the most convenient ways of crippling the distribution so others can't easily or legally reproduce your software.
  • Creative Commons Non-commercial or roll-your-own license. These explicitly forbid others from reselling your software, but this isn't recommended as it's unclear how well CC applies to software, and if you roll your own license always consult a lawyer.
  • No license (all rights reserved). If you distribute source code with no license, copyright law defaults to all rights reserved, which means people can look at and use the source privately for any purpose (you gave it to them after all), but they have no rights whatsoever for distribution or license transfer.

Having said that, there are a few points to clarify:

  • Restricting commercial use is NOT Open Source, as per (most people's) definition.
  • Commercial use covers more than just selling. Do you want people to host your game on their ad-supported page? To bundle it with some other package that earns money? To take parts of it to incorporate into a larger commercial work? That also falls under commercial use.
share|improve this answer
Thanks for this answer! A lot of helpful information in here :) –  justin.harrison Jun 20 '13 at 4:27
add comment

You're asking for something impossible. Part of the open source definition is that people can use the software as they wish. This includes "their own commercial efforts." There are no open-source licenses that would give you what you want. However, if you don't want other people building and selling your program, you could do this by publishing the code freely, but not the resources (artwork, etc.) However, such an approach could hinder the ability of "geeks and hackers" to do anything useful with your code.

If you want to sell open-source software, you have to be able to live with the fact that it's not exclusive to you. That's the way it works. You entice people to pay you for it by providing value above and beyond what they can get with a compiler. For example, you could run a server that provides services that your application uses. You could provide support for your program, with priority support going to paid users. You could run closed betas for updated versions that only paid users have access to. And that's just off the top of my head.

You have to change your mindset. In this modern day, you don't get people to pay for software by forcing them to. It doesn't work for proprietary software and it works even less so for open source. You get people to pay for software by convincing them that the value they would receive by paying for it exceeds the price you're asking.

share|improve this answer
You're right. I think i will probably end up going with a GPL license, or some form of apache. Thanks! –  justin.harrison Jun 20 '13 at 2:47
@justin.harrison: I'd recommend the MPL license. The GPL isn't for making your code open-source so hackers can play around with it; it's for pushing an anti-proprietary ideology on people. If that's not your goal, if you don't believe that proprietary software is inherently evil, the MPL will require that modifications to the MPL code (and only the MPL code, not "and anything else it touches") remain open-source so that you and everyone else can benefit from them. –  Mason Wheeler Jun 20 '13 at 4:09
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.