{"id":13744165,"url":"https://github.com/myflashlab/GoogleVR-ANE","last_synced_at":"2025-05-09T02:32:51.347Z","repository":{"id":82895682,"uuid":"61695709","full_name":"myflashlab/GoogleVR-ANE","owner":"myflashlab","description":"Google Virtual Reality SDK available to Adobe Air developers","archived":true,"fork":false,"pushed_at":"2019-08-03T18:24:19.000Z","size":284013,"stargazers_count":16,"open_issues_count":0,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-15T15:42:14.983Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"ActionScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/myflashlab.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-22T06:48:10.000Z","updated_at":"2023-01-28T00:43:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"6ffb1e57-ad9a-4dc1-a246-2ef3bd6ab27f","html_url":"https://github.com/myflashlab/GoogleVR-ANE","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myflashlab%2FGoogleVR-ANE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myflashlab%2FGoogleVR-ANE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myflashlab%2FGoogleVR-ANE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myflashlab%2FGoogleVR-ANE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/myflashlab","download_url":"https://codeload.github.com/myflashlab/GoogleVR-ANE/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253177854,"owners_count":21866407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T05:01:04.248Z","updated_at":"2025-05-09T02:32:48.299Z","avatar_url":"https://github.com/myflashlab.png","language":"ActionScript","readme":"# Google VR ANE for Android+iOS\nGoogle Virtual Reality SDK works on Android and iOS so why shouldn't it work on Air? This cool ANE will let you use 360 images and videos in your own AIR application.\n\n*Notice: Supporting Virtual 3D world is not in our to-do list. At least not for the moment, because rendering the 3D world in Virtual Reality is happening in OpenGL inside the native environment and ANEs cannot provide this feature to AS3* \n\n**Main Features:**\n* 360 image preview based on device orientation\n* 360 video preview based on device orientation\n* supporting Google VR Mode for [cardboard](https://vr.google.com/cardboard/index.html)\n* 100% identical AS3 API for Android and iOS\n\n[find the latest **asdoc** for this ANE here.](http://myflashlab.github.io/asdoc/index.html?com/myflashlab/air/extensions/googleVR/package-detail.html\u0026com/myflashlab/air/extensions/googleVR/class-list.html)  \n\n**NOTICE 2**: On older Android devices you may see your AIR content all black when you return from the 360 video view. This is an old bug in AIR and we hope Adobe would find the reason and hopefully fix it someday. In the meanwhile, [read this to fix the problem](http://forum.starling-framework.org/topic/ane-fix-for-blackblank-screen-bug-when-returning-to-air-android-apps)\n\n# AIR Usage General listeners\nFor the complete AS3 code usage, see the [demo project here](https://github.com/myflashlab/GoogleVR-ANE/blob/master/AIR/src/Demo.as).\n\n```actionscript\nimport com.myflashlab.air.extensions.googleVR.*;\n\nVR.init();\n\n// add general VR listeners\nVR.api.addEventListener(VREvents.VR_CLOSED, onVRClosed);\nVR.api.addEventListener(VREvents.DID_TAP, onVRTapped);\nVR.api.addEventListener(VREvents.DISPLAY_MODE_CHANGED, onVRModeChanged);\n\nfunction onVRClosed(e:VREvents):void\n{\n\ttrace(\"vr window closed!\");\n}\n\nfunction onVRTapped(e:VREvents):void\n{\n\ttrace(\"vr window tapped!\");\n\t\n\t// get the current head position of the VR view\n\ttrace(VR.api.headRotation);\n\t\n\t// you can change display mode from AS3 also.\n\t//VR.api.displayMode = DisplayMode.FULLSCREEN_STEREO;\n\t\n\t// when playing 360 videos, you may toggle pause/resume when the VR screen is tapped\n\tif (VR.api.videoView.isPaused)\n\t{\n\t\tVR.api.videoView.resume();\n\t}\n\telse\n\t{\n\t\tVR.api.videoView.pause();\n\t}\n}\n\nfunction onVRModeChanged(e:VREvents):void\n{\n\tswitch (e.displaymode) \n\t{\n\t\tcase DisplayMode.EMBEDDED:\n\t\t\ttrace(\"vr mode changed: EMBEDDED\");\n\t\tbreak;\n\t\t\n\t\tcase DisplayMode.FULLSCREEN_MONO:\n\t\t\ttrace(\"vr mode changed: FULLSCREEN_MONO\");\n\t\tbreak;\n\t\t\n\t\tcase DisplayMode.FULLSCREEN_STEREO:\n\t\t\ttrace(\"vr mode changed: FULLSCREEN_STEREO\");\n\t\tbreak;\n\t\t\n\t\tdefault:\n\t}\n}\n```\n\n# AIR Usage 360 Image\nFor the complete AS3 code usage, see the [demo project here](https://github.com/myflashlab/GoogleVR-ANE/blob/master/AIR/src/Demo.as).\n\n```actionscript\n// configure the 360 image object you want to launch\nvar vrSetting:VRConfigImg = new VRConfigImg();\nvrSetting.btnExit = File.applicationDirectory.resolvePath(\"exit.png\");\nvrSetting.image360 = File.applicationDirectory.resolvePath(\"360Img.jpg\");\nvrSetting.imageType = VRConfig.TYPE_STEREO_OVER_UNDER;\nvrSetting.stereoModeButtonEnabled = true;\nvrSetting.infoButtonEnabled = false;\nvrSetting.touchTrackingEnabled = true;\n\n// and finally attach the Image Config instance to the VR ANE\nVR.api.imageView.addEventListener(VREvents.LOAD_FAILED, onLoadFailed);\nVR.api.imageView.addEventListener(VREvents.LOAD_SUCCESS, onLoadSuccess);\nVR.api.imageView.attach(vrSetting);\n\nfunction onLoadFailed(e:VREvents):void\n{\n\tVR.api.imageView.removeEventListener(VREvents.LOAD_FAILED, onLoadFailed);\n\tVR.api.imageView.removeEventListener(VREvents.LOAD_SUCCESS, onLoadSuccess);\n\t\n\ttrace(\"onLoadFailed: \" + e.msg);\n}\n\nfunction onLoadSuccess(e:VREvents):void\n{\n\tVR.api.imageView.removeEventListener(VREvents.LOAD_FAILED, onLoadFailed);\n\tVR.api.imageView.removeEventListener(VREvents.LOAD_SUCCESS, onLoadSuccess);\n\t\n\ttrace(\"onLoadSuccess\");\n}\n```\n\n# AIR Usage 360 Video\nFor the complete AS3 code usage, see the [demo project here](https://github.com/myflashlab/GoogleVR-ANE/blob/master/AIR/src/Demo.as).\n\n```actionscript\n// configure the 360 video object you want to launch\nvar vrSetting:VRConfigVid = new VRConfigVid();\nvrSetting.btnExit = File.applicationDirectory.resolvePath(\"exit.png\");\nvrSetting.video360 = File.applicationDirectory.resolvePath(\"360Vid.mp4\");\n//vrSetting.video360URL = \"http://192.168.0.11/project/products/MyFlashLab_ANEs/googleVR/Vx.x.x/FD/bin/360Vid.mp4\";\nvrSetting.videoType = VRConfig.TYPE_STEREO_OVER_UNDER;\nvrSetting.stereoModeButtonEnabled = true;\nvrSetting.infoButtonEnabled = false;\nvrSetting.touchTrackingEnabled = true;\nvrSetting.fullscreenButtonEnabled = true;\n\nVR.api.videoView.addEventListener(VREvents.LOAD_FAILED, \tonVideoLoadFailed);\nVR.api.videoView.addEventListener(VREvents.LOAD_SUCCESS, \tonVideoLoadSuccess);\n\nVR.api.videoView.addEventListener(VREvents.PAUSED, \t\t\tonVideoPaused);\nVR.api.videoView.addEventListener(VREvents.REACHED_END, \tonVideoReachedEnd);\nVR.api.videoView.addEventListener(VREvents.RESUMED, \t\tonVideoResumed);\nVR.api.videoView.addEventListener(VREvents.STOPPED, \t\tonVideoStopped);\nVR.api.videoView.addEventListener(VREvents.POS_UPDATED, \tonVideoPositionUpdated);\n\nVR.api.videoView.attach(vrSetting);\n\nfunction onVideoLoadFailed(e:VREvents):void\n{\n\tVR.api.videoView.removeEventListener(VREvents.LOAD_FAILED, onVideoLoadFailed);\n\tVR.api.videoView.removeEventListener(VREvents.LOAD_SUCCESS, onVideoLoadSuccess);\n\t\n\ttrace(\"onVideoLoadFailed: \" + e.msg);\n}\n\nfunction onVideoLoadSuccess(e:VREvents):void\n{\n\tVR.api.videoView.removeEventListener(VREvents.LOAD_FAILED, onVideoLoadFailed);\n\tVR.api.videoView.removeEventListener(VREvents.LOAD_SUCCESS, onVideoLoadSuccess);\n\t\n\ttrace(\"onVideoLoadSuccess, video duration = \" + e.duration);\n}\n\nfunction onVideoPaused(e:VREvents):void\n{\n\ttrace(\"onVideoPaused\");\n}\n\nfunction onVideoResumed(e:VREvents):void\n{\n\ttrace(\"onVideoResumed\");\n}\n\nfunction onVideoStopped(e:VREvents):void\n{\n\ttrace(\"onVideoStopped\");\n}\n\nfunction onVideoReachedEnd(e:VREvents):void\n{\n\tVR.api.videoView.seekTo(0);\n\tVR.api.videoView.resume();\n\t\n\ttrace(\"onVideoReachedEnd\");\n}\n\nfunction onVideoPositionUpdated(e:VREvents):void\n{\n\ttrace(\"position updated... \" + e.position + \" / \" + e.duration);\n}\n```\n\n# AIR .xml manifest\n```xml\n\u003c!--\nFOR ANDROID:\n--\u003e\n\u003cmanifest android:installLocation=\"auto\"\u003e\n\t\n\t\u003c!--Android SDK 19 or higher can run Google VR only--\u003e\n\t\u003cuses-sdk android:minSdkVersion=\"19\" /\u003e\n\t\u003cuses-sdk android:targetSdkVersion=\"28\"/\u003e\n\t\n\t\u003c!-- \n\t\tFor Google VR to work properly, it is adviced to set largeHeap to true. learn\n\t\tabout this attribute here:\n\t\thttps://developer.android.com/guide/topics/manifest/application-element.html \n\t--\u003e\n\t\u003capplication android:largeHeap=\"true\"\u003e\n\t\t\n\t\t\u003c!-- This activity is your main AIR application If you don't add it, AIR SDK will do that for you! --\u003e\n\t\t\u003cactivity\u003e\n\t\t\t\u003cintent-filter\u003e\n\t\t\t\t\u003caction android:name=\"android.intent.action.MAIN\" /\u003e\n\t\t\t\t\u003ccategory android:name=\"android.intent.category.LAUNCHER\" /\u003e\n\t\t\t\u003c/intent-filter\u003e\n\t\t\t\u003cintent-filter\u003e\n\t\t\t\t\u003caction android:name=\"android.intent.action.VIEW\" /\u003e\n\t\t\t\t\u003ccategory android:name=\"android.intent.category.BROWSABLE\" /\u003e\n\t\t\t\t\u003ccategory android:name=\"android.intent.category.DEFAULT\" /\u003e\n\t\t\t\u003c/intent-filter\u003e\n\t\t\u003c/activity\u003e\n\t\t\n\t\t\u003c!-- Required for the Google VR --\u003e\n\t\t\u003cactivity android:name=\"com.myflashlab.gvr.MyVrImageView\" android:launchMode=\"singleTask\" android:theme=\"@style/Theme.FullScreen\" /\u003e\n\t\t\u003cactivity android:name=\"com.myflashlab.gvr.MyVrVideoView\" android:launchMode=\"singleTask\" android:theme=\"@style/Theme.FullScreen\" /\u003e\n\t\t\n\t\u003c/application\u003e\n\u003c/manifest\u003e\n\n\n\n\n\n\u003c!--\nFOR iOS:\n--\u003e\n\t\u003cInfoAdditions\u003e\n\t\n\t\t\u003c!--iOS 10.0 or higher can support this ANE--\u003e\n\t\t\u003ckey\u003eMinimumOSVersion\u003c/key\u003e\n\t\t\u003cstring\u003e10.0\u003c/string\u003e\n\t\t\n\t\t\u003c!-- Bypass iOS security when debugging your app and you need to load resources from a local server like http://192.168.x.x --\u003e\n\t\t\u003ckey\u003eNSAppTransportSecurity\u003c/key\u003e\n\t\t\u003cdict\u003e\n\t\t\t\u003ckey\u003eNSAllowsArbitraryLoads\u003c/key\u003e\n\t\t\t\u003ctrue/\u003e\n\t\t\u003c/dict\u003e\n\t\t\n\t\t\u003c!-- Required when user wants to scan barcodes while using the card --\u003e\n\t\t\u003ckey\u003eNSCameraUsageDescription\u003c/key\u003e\n\t\t\u003cstring\u003eCamera usage description\u003c/string\u003e\n\t\t\n\t\u003c/InfoAdditions\u003e\n\t\n\t\n\t\n\t\n\t\n\u003c!--\nEmbedding the ANE:\n--\u003e\n  \u003cextensions\u003e\n\t\n\t\u003c!-- \n\t\tbelow are the common dependencies that Google VR relies on:\n\t\tdownload them from https://github.com/myflashlab/common-dependencies-ANE \n\t--\u003e\n\t\u003cextensionID\u003ecom.myflashlab.air.extensions.dependency.gvr.common\u003c/extensionID\u003e\n\t\u003cextensionID\u003ecom.myflashlab.air.extensions.dependency.gvr.commonwidget\u003c/extensionID\u003e\n\t\u003cextensionID\u003ecom.myflashlab.air.extensions.dependency.gvr.panowidget\u003c/extensionID\u003e\n\t\u003cextensionID\u003ecom.myflashlab.air.extensions.dependency.gvr.videowidget\u003c/extensionID\u003e\n\t\u003cextensionID\u003ecom.myflashlab.air.extensions.dependency.androidSupport.core\u003c/extensionID\u003e\n\t\u003cextensionID\u003ecom.myflashlab.air.extensions.dependency.androidSupport.v4\u003c/extensionID\u003e\n    \u003cextensionID\u003ecom.myflashlab.air.extensions.dependency.overrideAir\u003c/extensionID\u003e\n\t\n\t\u003c!-- And finally embed the main GVR ANE --\u003e\n    \u003cextensionID\u003ecom.myflashlab.air.extensions.googleVR\u003c/extensionID\u003e\n\t\u003cextensionID\u003ecom.myflashlab.air.extensions.permissionCheck\u003c/extensionID\u003e\n\t\n  \u003c/extensions\u003e\n--\u003e\n```\n\n# Requirements \n1. Android API 19+\n2. iOS SDK 10.0+\n3. AIR SDK 30+\n4. On the iOS side, you need to make sure you have included the resources at the root of you package. \n  * **CardboardSDK.bundle**\n  * **GoogleKitCore.bundle**\n  * **GoogleKitDialogs.bundle**\n  * **GoogleKitHUD.bundle**\n  * **MaterialRobotoFontLoader.bundle**\n5. Moreover, on the iOS side, you will need **GoogleToolboxForMac.framework** and **GTMSessionFetcher.framework** available in your *AIR_SDK/lib/aot/stub* folder. Download them from [this package - Firebase SDK V5.20.2](https://dl.google.com/firebase/sdk/ios/5_20_2/Firebase-5.20.2.zip).\n\n# Permissions\nBelow are the list of Permissions this ANE might require. Check out the demo project available at this repository to see how we have used the [PermissionCheck ANE](http://www.myflashlabs.com/product/native-access-permission-check-settings-menu-air-native-extension/) to ask for the permissions.\n\nNecessary | Optional\n--------------------------- | ---------------------------\n. | [SOURCE_STORAGE](https://myflashlab.github.io/asdoc/com/myflashlab/air/extensions/nativePermissions/PermissionCheck.html#SOURCE_STORAGE)  \n.  | [SOURCE_CAMERA](https://myflashlab.github.io/asdoc/com/myflashlab/air/extensions/nativePermissions/PermissionCheck.html#SOURCE_CAMERA)  \n\n# Commercial Version\nhttps://www.myflashlabs.com/product/virtual-reality-air-native-extension/\n\n[![Google VR ANE](https://www.myflashlabs.com/wp-content/uploads/2016/06/product_adobe-air-ane-virtual-reality-2018-595x738.jpg)](https://www.myflashlabs.com/product/virtual-reality-air-native-extension/)\n\n# Tutorials\n[How to embed ANEs into **FlashBuilder**, **FlashCC** and **FlashDevelop**](https://www.youtube.com/watch?v=Oubsb_3F3ec\u0026list=PL_mmSjScdnxnSDTMYb1iDX4LemhIJrt1O)  \n\n# Premium Support #\n[![Premium Support package](https://www.myflashlabs.com/wp-content/uploads/2016/06/professional-support.jpg)](https://www.myflashlabs.com/product/myflashlabs-support/)\nIf you are an [active MyFlashLabs club member](https://www.myflashlabs.com/product/myflashlabs-club-membership/), you will have access to our private and secure support ticket system for all our ANEs. Even if you are not a member, you can still receive premium help if you purchase the [premium support package](https://www.myflashlabs.com/product/myflashlabs-support/).","funding_links":[],"categories":["Native Extension","AIR Native Extensions"],"sub_categories":["Hardware ANE"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyflashlab%2FGoogleVR-ANE","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmyflashlab%2FGoogleVR-ANE","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyflashlab%2FGoogleVR-ANE/lists"}