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
| <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>com.google.android.gms</groupId> | |
| <artifactId>play-services-games</artifactId> | |
| <version>9.4.0</version> | |
| <packaging>aar</packaging> | |
| <dependencies> | |
| <dependency> | |
| <groupId>com.google.android.gms</groupId> | |
| <artifactId>play-services-base</artifactId> |
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
| var service:Service = new Service( Service.GOOGLE_PLAY_GAME_SERVICES ); | |
| service.enableSavedGames = true; | |
| GameServices.service.initialiseService( service ); | |
| // com.distriqt.GameServices |
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
| var obbFile:ExpansionFile = new ExpansionFile( ExpansionFile.MAIN, 1001003, 93147195 ); | |
| if (ExpansionFiles.service.obbUtils.isMounted( obbFile )) | |
| { | |
| ExpansionFiles.service.obbUtils.unmount( obbFile ); | |
| } | |
| // com.distriqt.ExpansionFiles |
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
| var obbFile:ExpansionFile = new ExpansionFile( ExpansionFile.MAIN, 1001003, 93147195 ); | |
| if (ExpansionFiles.service.obbUtils.isMounted( obbFile )) | |
| { | |
| var path:String = ExpansionFiles.service.obbUtils.getMountedPath( obbFile ); | |
| var file:File = new File( path + "/images/image.jpg" ); | |
| // You can use normal file operations | |
| trace( file.url ); | |
| trace( "exists="+file.exists ); |
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
| var obbFile:ExpansionFile = new ExpansionFile( ExpansionFile.MAIN, 1001003, 93147195 ); | |
| if (ExpansionFiles.service.expansionFilesDelivered()) | |
| { | |
| ExpansionFiles.service.obbUtils.addEventListener( OBBUtilsEvent.STATE_CHANGED, obbUtils_stateChangedHandler ); | |
| var success:Boolean = ExpansionFiles.service.obbUtils.mount( obbFile ); | |
| } | |
| ... |
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
| CloudStorage.service.documentStore.addEventListener( DocumentEvent.LOAD_COMPLETE, loadCompleteHandler ); | |
| CloudStorage.service.documentStore.addEventListener( DocumentEvent.LOAD_ERROR, loadErrorHandler ); | |
| var success:Boolean = CloudStorage.service.documentStore.loadDocument( "uniqueFilename.txt" ); | |
| ... | |
| private function loadCompleteHandler( event:DocumentEvent ):void | |
| { | |
| trace( "document load complete" ); |
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
| var document:Document = new Document(); | |
| document.filename = "uniqueFilename.txt"; // Must be unique in the container | |
| document.data = new ByteArray(); | |
| document.data.writeUTFBytes( "TEST SOME STRING WRITING" ); // Some test data | |
| CloudStorage.service.documentStore.addEventListener( DocumentEvent.SAVE_COMPLETE, createCompleteHandler ); | |
| CloudStorage.service.documentStore.addEventListener( DocumentEvent.SAVE_ERROR, createErrorHandler ); | |
| CloudStorage.service.documentStore.saveDocument( document ); |
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
| if (CloudStorage.service.documentStore.isAvailable) | |
| { | |
| var documents:Vector.<Document> = CloudStorage.service.documentStore.listDocuments(); | |
| for each (var document:Document in documents) | |
| { | |
| trace( "document: "+document.filename +" ["+document.url+"]" ); | |
| } | |
| } |
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
| if (CloudStorage.service.documentStore.isAvailable) | |
| { | |
| // Cloud document storage is available | |
| } | |
| else | |
| { | |
| // Handle this situation appropriately | |
| } | |
| // com.distriqt.CloudStorage |
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
| CloudStorage.service.documentStore.addEventListener( DocumentStoreEvent.UPDATE_START, updateStartHandler ); | |
| CloudStorage.service.documentStore.addEventListener( DocumentStoreEvent.UPDATE_END, updateEndHandler ); | |
| CloudStorage.service.documentStore.update(); | |
| ... | |
| private function updateStartHandler( event:DocumentStoreEvent ):void | |
| { | |
| trace( "update started" ); |