I have an ads supported application in the Android market. I'm willing to release another application that will cost money and once the user installed it, will remove the ads from the free application ("Unlocker" or "Key" application).
For it to work, I'm checking if the paid application is installed using PackageManager.getPackageInfo() and if it is, I'm setting the visibility of all the ads View to View.Gone.
Is there any chance that the ads View's visibility will 开发者_运维技巧change again to Visible by the ads service itself? I ask because normally, when there are no ads to show the ads visibility is set internally to View.Gone and restored again when there are ads to show.
Any other suggestion on how to remove the ads views from my application if the user installed the "Unlocker" application?
Thank you very much.
- If both of your applications share same user-id and signature key (public/private), then they can access each other's data.
- In your main application maintain a persistent data/bit (in some shared storage) initially set to display ads.
- The paid application when installed and run for the first time will uncheck this.
Try loading a different Layout if the no ad bit is set, where no ads are embedded.
精彩评论