Created
September 21, 2021 09:54
-
-
Save marchbold/efe2df7d884d58e47e5a133177d32906 to your computer and use it in GitHub Desktop.
An Introduction to APM ExampleApp source
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
import com.distriqt.extension.idfa.IDFA; | |
import com.distriqt.extension.idfa.TrackingAuthorisationStatus; | |
import com.distriqt.extension.idfa.events.IDFAEvent; | |
import flash.display.Sprite; | |
public class ExampleApp extends Sprite | |
{ | |
public function ExampleApp() | |
{ | |
IDFA.service.addEventListener( IDFAEvent.COMPLETE, idfaCompleteHandler ); | |
IDFA.service.requestAuthorisation( | |
function ( status:String ):void { | |
if (status == TrackingAuthorisationStatus.AUTHORISED) | |
{ | |
IDFA.service.getIDFA(); | |
} | |
} | |
); | |
} | |
private function idfaCompleteHandler( event:IDFAEvent ):void | |
{ | |
trace( "identifier: " + event.identifier ); | |
trace( "isLimitAdTrackingEnabled: " + event.isLimitAdTrackingEnabled ); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment