Are you talking about Adobe AIR? All functions are asychronous, so you have to have a function that reads the number of trial days remaining. See the example Adobe AIR application & article.
Hi,
After calling TrialDaysRemaining(); , it return to TurboActivateEvent.TRIAL_DAYS_REMAINING , this is fine. Resulting variable of TurboActivateEvent didn't give me days remaining in trial.But how i will know no. of days remaining in trial ? or trial is still activated.
Thanks in advance.
Thanks
Are you talking about Adobe AIR? All functions are asychronous, so you have to have a function that reads the number of trial days remaining. See the example Adobe AIR application & article.
I have followed same example .
As i have already mentioned that i have registered event as
private var ta:TurboActivate = new TurboActivate();ta.addEventListener(TurboActivateEvent.TRIAL_DAYS_REMAINING, onTrialDaysRemaining);
and on calling function
ta.TrialDaysRemaining();
On returning to registered function how i would know days remaining . I have trial of one day . private function onTrialDaysRemaining(evt:TurboActivateEvent):void { var i:int=evt.uintResponse; var k:int=evt.currentTarget.remainingResp; }
both i & k are 0 .Thanks
Follow the way the trials are checked in the example app. That includes checking for errors.
Things you might be doing wrong:
Thanks for the help.
Followed mentioned steps and it showed me positive results. on return of
private function onTrialDaysRemaining(evt:TurboActivateEvent):void { var ij:int=evt.uintResponse; // for Trial Days remainig ... it gives 1 if(ij>0) Alert.show(" Trial Available."); }
and when after 24 hours i expired , evt.uintResponse gave me 0. This one showed me that if trial days are remaining it will be 1 else 0.
If someone confirms this , i will be very thankful.
Thanks
Yes, if you look at the example, "evt.uintResponse" will give you the amount of days remaining in the trial:
private function onTrialDaysRemaining(evt:TurboActivateEvent):void{ if (evt.ErrorObj == null) { trialDaysRemaining = evt.uintResponse; EndLicensingCheck(); } else { // in a real world app don't throw exceptions. This is for debugging only throw evt.ErrorObj; }}