{"id":314,"date":"2016-04-22T23:57:27","date_gmt":"2016-04-22T23:57:27","guid":{"rendered":"https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/?p=314"},"modified":"2016-04-25T21:25:36","modified_gmt":"2016-04-25T21:25:36","slug":"unity-android-custom-plugin-with-cardboard-sdk","status":"publish","type":"post","link":"https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/index.php\/2016\/04\/22\/unity-android-custom-plugin-with-cardboard-sdk\/","title":{"rendered":"Unity Android Custom Plugin with Cardboard SDK"},"content":{"rendered":"<p>We had a hard time for merging our custom plugin with Unity google cardboard SDK.\u00a0Unity only provides single main activity in Android side. We used two tricks for using other activity in Unity main activity : using Intent android native function and Inheritance from google cardboard unity activity. By using these method, we could\u00a0combine Google drive SDK, Dropbox SDK and Google cardboard SDK together.<\/p>\n<p>The first method is using intent function in android native side.<\/p>\n<div id=\"attachment_317\" style=\"width: 1483px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-317\" class=\"wp-image-317 size-full\" src=\"https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/wp-content\/uploads\/2016\/04\/adfadf.png\" alt=\"http:\/\/forum.unity3d.com\/threads\/android-plugin-multiple-android-activity-problems.149089\/\" width=\"1473\" height=\"950\" srcset=\"https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/wp-content\/uploads\/2016\/04\/adfadf.png 1473w, https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/wp-content\/uploads\/2016\/04\/adfadf-300x193.png 300w, https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/wp-content\/uploads\/2016\/04\/adfadf-768x495.png 768w, https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/wp-content\/uploads\/2016\/04\/adfadf-1024x660.png 1024w\" sizes=\"(max-width: 1473px) 100vw, 1473px\" \/><p id=\"caption-attachment-317\" class=\"wp-caption-text\">http:\/\/forum.unity3d.com\/threads\/android-plugin-multiple-android-activity-problems.149089\/<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>The second is\u00a0Inheritance from google cardboard unity activity which is main activity. If tried to use this method, you need to make sure to overwrite all parent basic function by using SUPER class.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-319 \" src=\"https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/wp-content\/uploads\/2016\/04\/ggg.png\" alt=\"ggg\" width=\"648\" height=\"311\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We had a hard time for merging our custom plugin with Unity google cardboard SDK.\u00a0Unity only provides single main activity in Android side. We used two tricks for using other activity in Unity main activity : using Intent android native function and Inheritance from google cardboard unity activity. By using these method, we could\u00a0combine Google <a href=\"https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/index.php\/2016\/04\/22\/unity-android-custom-plugin-with-cardboard-sdk\/\" rel=\"nofollow\"><span class=\"sr-only\">Read more about Unity Android Custom Plugin with Cardboard SDK<\/span>[&hellip;]<\/a><\/p>\n","protected":false},"author":3,"featured_media":317,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"pgc_meta":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-314","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vr-rehearsal"],"_links":{"self":[{"href":"https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/index.php\/wp-json\/wp\/v2\/posts\/314"}],"collection":[{"href":"https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/index.php\/wp-json\/wp\/v2\/comments?post=314"}],"version-history":[{"count":4,"href":"https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/index.php\/wp-json\/wp\/v2\/posts\/314\/revisions"}],"predecessor-version":[{"id":321,"href":"https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/index.php\/wp-json\/wp\/v2\/posts\/314\/revisions\/321"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/index.php\/wp-json\/wp\/v2\/media\/317"}],"wp:attachment":[{"href":"https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/index.php\/wp-json\/wp\/v2\/media?parent=314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/index.php\/wp-json\/wp\/v2\/categories?post=314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/projects-old.etc.cmu.edu\/vr-rehearsal\/index.php\/wp-json\/wp\/v2\/tags?post=314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}