Should I clone my "paid app" project to make the "free app"?

Put your problem here if it does not fit any of the other categories.

Should I clone my "paid app" project to make the "free app"?

Postby biskoppen » Sun Feb 05, 2012 6:22 pm

I just launched the paid version of my app and now I need to make a free version of it.. this will only require some minor changes in my code.. but the package name needs to be different..

How do I do this?
biskoppen
Junior Developer
Junior Developer
 
Posts: 22
Joined: Tue Dec 27, 2011 5:35 pm

Top

Re: Should I clone my "paid app" project to make the "free a

Postby jonbonazza » Sun Feb 05, 2012 7:01 pm

Normally, you would take this into account when designing the app and name the packages appropriately. However, since you are just now making this decision, you can simply refactor the package names from within Eclipse and make the changes you need within the code itself.
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Re: Should I clone my "paid app" project to make the "free a

Postby BossOss » Mon Feb 06, 2012 3:02 pm

don't forget to delete packages/classes that are not needed in the free version .. i would exclude all of them ...

gl
BossOss
Junior Developer
Junior Developer
 
Posts: 15
Joined: Mon Jan 09, 2012 2:54 pm

Re: Should I clone my "paid app" project to make the "free a

Postby zoki » Fri Feb 10, 2012 11:53 am

I don't recommend you cloning because you will die in merging changes. Create a copy of current project and set it as library. Then Create two different project with two different namespaces (free and paid). In every project set reference to library project and create a manifest file with full library namespaces.
Google more about that.

For difference between free and paid I recommend you to create some class in library project like that:
Code: Select all
private static Boolean _marketCheck = null;
   public static boolean useMarketCheck(Activity c)
   {
      if (_marketCheck == null)
         _marketCheck = c.getResources().getBoolean(R.bool.marketCheck);
      
      return _marketCheck;
   }


and create xml file in /res/values/something.xml:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <bool name="marketCheck">false</bool>
    <bool name="ads">true</bool>
</resources>


You then need to copy that xml file in every project which will override library resource file.

That's it. You will now have only one project (library), free and paid are more or less empty (only resources and manifest).
zoki
Freshman
Freshman
 
Posts: 3
Joined: Tue Jan 24, 2012 11:50 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 23 guests