Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Best way to implement Ad-Supported and Paid app versions

  1. #1
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,669
    Thanks
    25
    Thanked 327 Times in 304 Posts

    Default Best way to implement Ad-Supported and Paid app versions

    I have an app and I am looking to have two version: a free, ad-supported version, and a paid $0.99 version. The two apps should be identical, with the only exception being one has ads and the other doesn't.
    Since they should be identical, I was hoping to try to figure out a way to share resources and UIs between the two (the free version would be extended from the paid version, to include the advertisements).
    The operational code is already in its own library, it is just the UI and resources that I need to figure out how to make shareable. Does anyone have any suggestions?
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/


  2. #2
    Forum VIP
    Join Date
    Jun 2011
    Posts
    317
    My Mood
    Bored
    Thanks
    47
    Thanked 89 Times in 74 Posts
    Blog Entries
    4

    Default Re: Best way to implement Ad-Supported and Paid app versions

    As I see it there are two options, each with their own pro's and con's.

    Option 1 - Create a branch in source control. The big con here is new features / bug fixes need to be manually applied to both branches.
    Option 2 - A global static variable IS_PAID and a bunch of if's to change the UI.

    I had a problem just today when a client needed a custom build of our app. After a long discussion with a college and we decided on Option 1. Option 2 is the lazy approach and may be appropriate if the app is early in the development cycle but the issue is that global states are an anti-pattern and introduce extra complexity when it comes to maintenance. Realistically, if your business logic is decoupled from the UI then Option 1 is a clear winner

  3. The Following User Says Thank You to ChristopherLowe For This Useful Post:

    GregBrannon (July 28th, 2014)

  4. #3
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,669
    Thanks
    25
    Thanked 327 Times in 304 Posts

    Default Re: Best way to implement Ad-Supported and Paid app versions

    Actually, I came across something interesting: Managing Projects from Eclipse with ADT | Android Developers
    I wonder if this will serve my purpose. Since it sounds like you are having a similar issue, I will be sure to tell you how it goes.
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

  5. #4
    Junior Member
    Join Date
    Jun 2014
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Best way to implement Ad-Supported and Paid app versions

    this was great info, thanks

  6. #5
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,669
    Thanks
    25
    Thanked 327 Times in 304 Posts

    Default Re: Best way to implement Ad-Supported and Paid app versions

    FYI: I followed this up with a tutorial which should work: Android Tutorial: Shared Management of Ad-Free and Ad-Supported App Versions
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

Similar Threads

  1. SourceDataLine not supported pan
    By leviorr in forum The Cafe
    Replies: 0
    Last Post: December 30th, 2013, 02:43 AM
  2. File versions
    By vipincpy in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 5th, 2013, 07:07 AM
  3. Replies: 0
    Last Post: June 19th, 2012, 12:58 PM
  4. [SOLVED] Eclipse versions and yoxos(3 quesions)
    By Melawe in forum Java IDEs
    Replies: 2
    Last Post: October 19th, 2011, 01:52 PM
  5. IllegalArgumentException: Pan not supported
    By rtumatt in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: June 13th, 2010, 01:00 PM