Discussion Forums  >  Uncategorized

Replies: 4    Views: 279

slater
Android Fan
Profile
Posts: 87
Reg: Aug 09, 2011
St. Pete FL
870
08/13/11 11:48 AM (14 years ago)

Make a popup html? or any popup?

Would like to make a pop up thats asks people to buy the full version that is set on a time or run count. Like every 5 opens or every 10 days etc... anyone have any ideas?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/14/11 01:06 AM (14 years ago)
you'll need a few things to do this. a) A way to count or track the last pop-up and when you want to show the next one. b) A screen to show when the time is right. For the tracking, I would store these values in the devices preferences. The user will not see these values. Preferences are small bits of data to reference later. Like: 'lastPopDisplayed' or 'numberOfOpens' or whatever. You can read and write these the device using some built in buzztouch methods in the BT_strings.m class: setPrefString and getPrefString. To SET a value, like number of app-opens: Anywhere in your code you would: [BT_strings setPrefString:myAppOpenCount:1] To GET a value, like the previous value you set: NSString *savedValue = [BT_strings getPrefString:myAppOpenCount]; These two methods will allow you to get the previous amount, update it to something, then resave it. Next, when the time comes to show a screen, you'll want to use the +(void)handleTapToLoadScreen:(BT_item *)parentScreenData:(BT_item *)theMenuItemData:(BT_item *)theScreenData method in the BT_viewControllerManager.m class. You'll be simulating a button click to do this. No button is actually clicked so you'll pass null as the button. To use this method you'll need to get a reference to the new screen you want to show. It's in your list because you previously built it in your control panel.... BT_item *myNextScreensData = [appDelegate.rootApp getSceenDataByNickname:my screen nickname]; Then... [BT_viewControllerManager handleTapToLoadScreen:this.screenData:null:myNextScreensData]; You'll need to work out what screen you want to add this code to (this will be this.screenData) and get some things figured out but this should get you going in the right direction.
 
slater
Android Fan
Profile
Posts: 87
Reg: Aug 09, 2011
St. Pete FL
870
like
08/14/11 01:59 PM (14 years ago)
Thanks man! I will get started on it as soon as I get some time and post up the full report!
 
slater
Android Fan
Profile
Posts: 87
Reg: Aug 09, 2011
St. Pete FL
870
like
08/15/11 11:02 AM (14 years ago)
I plan to make a copy of the menu screen then modify it.. but when you click links that lead to the android market they open in a browser, what do I need to have them open in android market app?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/15/11 11:03 PM (14 years ago)
Not sure. It could be that the Android device will not allow this...Google maybe?
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.