{"id":1720,"date":"2013-10-08T09:00:52","date_gmt":"2013-10-08T09:00:52","guid":{"rendered":"https:\/\/www.gravityjack.com\/?p=1720"},"modified":"2023-12-02T09:01:15","modified_gmt":"2023-12-02T09:01:15","slug":"vuforia-unity-for-android-mobile-devices-what-developers-need-to-know","status":"publish","type":"post","link":"https:\/\/www.gravityjack.com\/news\/vuforia-unity-for-android-mobile-devices-what-developers-need-to-know\/","title":{"rendered":"Vuforia &amp; Unity for Android Mobile Devices &#8211; What Developers Need To Know!"},"content":{"rendered":"\n<p>So you want to integrate custom Android plugins written in Java, into a Vuforia-based Unity project&#8230;<br><br>In this post, we&#8217;ll show you how, and how to invoke methods defined in the Java plugin from a Unity C# script. The Image Targets sample is a starting point&nbsp;for a Unity project example.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p><strong>Steps to follow<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create a Unity project; for ease of reference we refer to it as \u201cQcarWithPlugin.\u201d<\/li>\n\n\n\n<li>Import the Image Targets sample package for Unity (Menu-&gt;Assets-&gt;Import custom package\u2026)<\/li>\n\n\n\n<li>Double-click&nbsp;the Image-Targets scene in the project view, so that the&nbsp;three Image Targets and their associated teapot models appear in the scene view.<\/li>\n\n\n\n<li>Create a new Android project in Eclipse; for ease of reference we&nbsp;call it&nbsp;<strong>MyPlugin<\/strong>; we assume the main activity will then be called&nbsp;<strong>MyPluginActivity.<\/strong><\/li>\n\n\n\n<li>Right-click on the project in Eclipse, go to\u00a0<strong>Properties &gt; Java Build Path &gt; Libraries<\/strong>, and add the following two libraries as \u201c<strong>external jars<\/strong>\u201d (both located under the\u00a0<strong>Assets\/Plugins\/Android<\/strong>\/ folder of your Unity project):\n<ul class=\"wp-block-list\">\n<li><em>QCAR.jar<\/em><\/li>\n\n\n\n<li><em>QCARUnityPlayer.jar<\/em><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Open the\u00a0<strong>MyPluginActivity.java<\/strong>\u00a0file in Eclipse, and make the following code changes:\n<ul class=\"wp-block-list\">\n<li>Make MyPluginActivity extend&nbsp;<strong>QCARPlayerActivity<\/strong>&nbsp;instead of Activity (press Ctrl-Shift-O to automatically adjust the imports).<\/li>\n\n\n\n<li>Remove the line \u201c<strong>setContentView(\u2026)<\/strong>\u201d from the&nbsp;<strong>onCreate()<\/strong>&nbsp;method.<\/li>\n\n\n\n<li>Add a custom public method called&nbsp;<strong>showMessage()<\/strong>&nbsp;to the MyPluginActivity class, and fill it with some code to show a Toast message with text.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>The code of your MyPluginActivity should look like the following:<\/p>\n\n\n\n<div>\n<div id=\"highlighter_439524\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<div>2<\/div>\n<div>3<\/div>\n<div>4<\/div>\n<div>5<\/div>\n<div>6<\/div>\n<div>7<\/div>\n<div>8<\/div>\n<div>9<\/div>\n<div>10<\/div>\n<div>11<\/div>\n<div>12<\/div>\n<div>13<\/div>\n<div>14<\/div>\n<div>15<\/div>\n<div>16<\/div>\n<div>17<\/div>\n<div>18<\/div>\n<div>19<\/div>\n<div>20<\/div>\n<div>21<\/div><\/td>\n<td>\n<div>\n<div><code>package<\/code> <code>com.qualcomm.plugins;<\/code><\/div>\n<div><\/div>\n<div><code>import<\/code> <code>android.os.Bundle;<\/code><\/div>\n<div><code>import<\/code> <code>android.widget.Toast;<\/code><\/div>\n<div><code>import<\/code> <code>com.qualcomm.QCARUnityPlayer.QCARPlayerActivity;<\/code><\/div>\n<div><\/div>\n<div><code>public<\/code> <code>class<\/code> <code>MyPluginActivity <\/code><code>extends<\/code> <code>QCARPlayerActivity {<\/code><\/div>\n<div><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>@Override<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>public<\/code> <code>void<\/code> <code>onCreate(Bundle savedInstanceState) {<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>super<\/code><code>.onCreate(savedInstanceState);<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>}<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>public<\/code> <code>void<\/code> <code>showMessage(<\/code><code>final<\/code> <code>String message) {<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>this<\/code><code>.runOnUiThread(<\/code><code>new<\/code> <code>Runnable() {<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0<\/code><code>public<\/code> <code>void<\/code> <code>run() {<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>Toast.makeText(MyPluginActivity.<\/code><code>this<\/code><code>, message, Toast.LENGTH_SHORT).show();<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0<\/code><code>}<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code><code>});<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>}<\/code><\/div>\n<div><code>}<\/code><\/div>\n<\/div><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n&nbsp;\n\n\n\n<ul class=\"wp-block-list\">\n<li>Right-click on the project, go to&nbsp;<strong>Properties -&gt; Android<\/strong>, tick the \u201c<strong>IsLibrary<\/strong>\u201d checkbox to turn your Android project into a library; this should make Eclipse generate a .JAR file (e.g., called \u201cmyplugin.jar\u201d) and store it in the \u201c\/bin\u201d folder of your Eclipse project.<\/li>\n\n\n\n<li>Open the \u201c<strong>\/bin<\/strong>\u201d folder and copy the JAR library from that folder to the \u201c<strong>Assets\/Plugins\/Android\/<\/strong>\u201d folder of your Unity project.<\/li>\n\n\n\n<li>Open and edit the&nbsp;<strong>AndroidManifest.xml&nbsp;<\/strong>file located in the same \u201cAssets\/Plugins\/Android\/\u201d directory.<\/li>\n\n\n\n<li>Replace the name of the main activity with your fully qualified Activity name, e.g., \u201ccom.my.org.MyPluginActivity.\u201d<\/li>\n\n\n\n<li>Create a C# script, call it&nbsp;<strong>MyPluginCaller<\/strong>&nbsp;for example, and attach it to each of your Image Targets in the scene (e.g., Chips, Stones, Tarmac).<\/li>\n\n\n\n<li>Copy the following code in your script, which will make your script invoke the&nbsp;<strong>showMessage()<\/strong>&nbsp;method of your MyPluginActivity class whenever a target is detected:<\/li>\n<\/ul>\n\n\n\n<div>\n<div id=\"highlighter_907688\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<div>2<\/div>\n<div>3<\/div>\n<div>4<\/div>\n<div>5<\/div>\n<div>6<\/div>\n<div>7<\/div>\n<div>8<\/div>\n<div>9<\/div>\n<div>10<\/div>\n<div>11<\/div>\n<div>12<\/div>\n<div>13<\/div>\n<div>14<\/div>\n<div>15<\/div>\n<div>16<\/div>\n<div>17<\/div>\n<div>18<\/div>\n<div>19<\/div>\n<div>20<\/div>\n<div>21<\/div>\n<div>22<\/div>\n<div>23<\/div>\n<div>24<\/div>\n<div>25<\/div>\n<div>26<\/div>\n<div>27<\/div>\n<div>28<\/div>\n<div>29<\/div>\n<div>30<\/div>\n<div>31<\/div>\n<div>32<\/div>\n<div>33<\/div>\n<div>34<\/div>\n<div>35<\/div>\n<div>36<\/div>\n<div>37<\/div>\n<div>38<\/div>\n<div>39<\/div>\n<div>40<\/div>\n<div>41<\/div>\n<div>42<\/div>\n<div>43<\/div>\n<div>44<\/div>\n<div>45<\/div>\n<div>46<\/div><\/td>\n<td>\n<div>\n<div><code>public<\/code> <code>class<\/code> <code>MyPluginCaller : MonoBehaviour, ITrackableEventHandler {<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>private<\/code> <code>TrackableBehaviour mTrackableBehaviour;<\/code><\/div>\n<div><code>\u00a0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>void<\/code> <code>Start()<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>{<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>mTrackableBehaviour = GetComponent&lt;TrackableBehaviour&gt;();<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>if<\/code> <code>(mTrackableBehaviour)<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>{<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>mTrackableBehaviour.RegisterTrackableEventHandler(<\/code><code>this<\/code><code>);<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>}<\/code><\/div>\n<div><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>OnTrackingLost();<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>}<\/code><\/div>\n<div><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>public<\/code> <code>void<\/code> <code>OnTrackableStateChanged(<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>TrackableBehaviour.Status previousStatus,<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>TrackableBehaviour.Status newStatus)<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>{<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>if<\/code> <code>(newStatus == TrackableBehaviour.Status.DETECTED ||<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>newStatus == TrackableBehaviour.Status.TRACKED)<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>{<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>OnTrackingFound();<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>}<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>else<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>{<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>OnTrackingLost();<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code>}<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>}<\/code><\/div>\n<div><\/div>\n<div><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>private<\/code> <code>void<\/code> <code>OnTrackingFound()<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>{<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code><code>AndroidJavaClass jc = <\/code><code>new<\/code> <code>AndroidJavaClass(<\/code><code>\"com.unity3d.player.UnityPlayer\"<\/code><code>); <\/code><\/div>\n<div><code>\u00a0\u00a0<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code><code>AndroidJavaObject jo = jc.GetStatic&lt;AndroidJavaObject&gt;(<\/code><code>\"currentActivity\"<\/code><code>); <\/code><\/div>\n<div><code>\u00a0\u00a0<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code><code>\/\/Invoke the \"showMessage\" method in our Android Plugin Activity<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code><code>string message = <\/code><code>\"Detected trackable: \"<\/code> <code>+ mTrackableBehaviour.TrackableName;<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code><code>jo.Call(<\/code><code>\"showMessage\"<\/code><code>, message);\u00a0<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>}<\/code><\/div>\n<div><\/div>\n<div><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>private<\/code> <code>void<\/code> <code>OnTrackingLost()<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>{<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>}<\/code><\/div>\n<div><code>}<\/code><\/div>\n<\/div><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n\n\n\n<p>Now your project should be ready to build and run on your Android device!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Like this post?<\/h3>\n","protected":false},"excerpt":{"rendered":"<p>So you want to integrate custom Android plugins written in Java, into a Vuforia-based Unity project&#8230; In this post, we&#8217;ll show you how, and how to invoke methods defined in the Java plugin from a Unity C# script. The Image Targets sample is a starting point&nbsp;for a Unity project example.<\/p>\n","protected":false},"author":9,"featured_media":1506,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1720","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Vuforia &amp; Unity for Android Mobile Devices - Plugins &amp; How-To!<\/title>\n<meta name=\"description\" content=\"In this post, we&#039;ll show you how to integrate custom Android plugins written in Java, into a Vuforia-based Unity project and how to invoke methods defined in the Java plugin from a Unity C# script.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.gravityjack.com\/news\/vuforia-unity-for-android-mobile-devices-what-developers-need-to-know\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Vuforia &amp; Unity for Android Mobile Devices - Plugins &amp; How-To!\" \/>\n<meta property=\"og:description\" content=\"In this post, we&#039;ll show you how to integrate custom Android plugins written in Java, into a Vuforia-based Unity project and how to invoke methods defined in the Java plugin from a Unity C# script.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.gravityjack.com\/news\/vuforia-unity-for-android-mobile-devices-what-developers-need-to-know\/\" \/>\n<meta property=\"og:site_name\" content=\"Gravity Jack\" \/>\n<meta property=\"article:published_time\" content=\"2013-10-08T09:00:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-02T09:01:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.gravityjack.com\/wp-content\/uploads\/2023\/11\/gj_news_nophoto_.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"344\" \/>\n\t<meta property=\"og:image:height\" content=\"194\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Gravity Admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Gravity Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.gravityjack.com\/news\/vuforia-unity-for-android-mobile-devices-what-developers-need-to-know\/\",\"url\":\"https:\/\/www.gravityjack.com\/news\/vuforia-unity-for-android-mobile-devices-what-developers-need-to-know\/\",\"name\":\"Vuforia & Unity for Android Mobile Devices - Plugins & How-To!\",\"isPartOf\":{\"@id\":\"https:\/\/www.gravityjack.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.gravityjack.com\/news\/vuforia-unity-for-android-mobile-devices-what-developers-need-to-know\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.gravityjack.com\/news\/vuforia-unity-for-android-mobile-devices-what-developers-need-to-know\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.gravityjack.com\/wp-content\/uploads\/2023\/11\/gj_news_nophoto_.jpg\",\"datePublished\":\"2013-10-08T09:00:52+00:00\",\"dateModified\":\"2023-12-02T09:01:15+00:00\",\"author\":{\"@id\":\"https:\/\/www.gravityjack.com\/#\/schema\/person\/63c79a7e30c630a69e6e003ef7476fcc\"},\"description\":\"In this post, we'll show you how to integrate custom Android plugins written in Java, into a Vuforia-based Unity project and how to invoke methods defined in the Java plugin from a Unity C# script.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.gravityjack.com\/news\/vuforia-unity-for-android-mobile-devices-what-developers-need-to-know\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.gravityjack.com\/news\/vuforia-unity-for-android-mobile-devices-what-developers-need-to-know\/#primaryimage\",\"url\":\"https:\/\/www.gravityjack.com\/wp-content\/uploads\/2023\/11\/gj_news_nophoto_.jpg\",\"contentUrl\":\"https:\/\/www.gravityjack.com\/wp-content\/uploads\/2023\/11\/gj_news_nophoto_.jpg\",\"width\":344,\"height\":194,\"caption\":\"Gravity Jack In the Press\"},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.gravityjack.com\/#website\",\"url\":\"https:\/\/www.gravityjack.com\/\",\"name\":\"Gravity Jack\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.gravityjack.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.gravityjack.com\/#\/schema\/person\/63c79a7e30c630a69e6e003ef7476fcc\",\"name\":\"Gravity Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.gravityjack.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/aa3d42e00068a5cdefa39bab3155196c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/aa3d42e00068a5cdefa39bab3155196c?s=96&d=mm&r=g\",\"caption\":\"Gravity Admin\"},\"url\":\"https:\/\/www.gravityjack.com\/author\/gjmagravityjack-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Vuforia & Unity for Android Mobile Devices - Plugins & How-To!","description":"In this post, we'll show you how to integrate custom Android plugins written in Java, into a Vuforia-based Unity project and how to invoke methods defined in the Java plugin from a Unity C# script.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.gravityjack.com\/news\/vuforia-unity-for-android-mobile-devices-what-developers-need-to-know\/","og_locale":"en_US","og_type":"article","og_title":"Vuforia & Unity for Android Mobile Devices - Plugins & How-To!","og_description":"In this post, we'll show you how to integrate custom Android plugins written in Java, into a Vuforia-based Unity project and how to invoke methods defined in the Java plugin from a Unity C# script.","og_url":"https:\/\/www.gravityjack.com\/news\/vuforia-unity-for-android-mobile-devices-what-developers-need-to-know\/","og_site_name":"Gravity Jack","article_published_time":"2013-10-08T09:00:52+00:00","article_modified_time":"2023-12-02T09:01:15+00:00","og_image":[{"width":344,"height":194,"url":"https:\/\/www.gravityjack.com\/wp-content\/uploads\/2023\/11\/gj_news_nophoto_.jpg","type":"image\/jpeg"}],"author":"Gravity Admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Gravity Admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.gravityjack.com\/news\/vuforia-unity-for-android-mobile-devices-what-developers-need-to-know\/","url":"https:\/\/www.gravityjack.com\/news\/vuforia-unity-for-android-mobile-devices-what-developers-need-to-know\/","name":"Vuforia & Unity for Android Mobile Devices - Plugins & How-To!","isPartOf":{"@id":"https:\/\/www.gravityjack.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.gravityjack.com\/news\/vuforia-unity-for-android-mobile-devices-what-developers-need-to-know\/#primaryimage"},"image":{"@id":"https:\/\/www.gravityjack.com\/news\/vuforia-unity-for-android-mobile-devices-what-developers-need-to-know\/#primaryimage"},"thumbnailUrl":"https:\/\/www.gravityjack.com\/wp-content\/uploads\/2023\/11\/gj_news_nophoto_.jpg","datePublished":"2013-10-08T09:00:52+00:00","dateModified":"2023-12-02T09:01:15+00:00","author":{"@id":"https:\/\/www.gravityjack.com\/#\/schema\/person\/63c79a7e30c630a69e6e003ef7476fcc"},"description":"In this post, we'll show you how to integrate custom Android plugins written in Java, into a Vuforia-based Unity project and how to invoke methods defined in the Java plugin from a Unity C# script.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.gravityjack.com\/news\/vuforia-unity-for-android-mobile-devices-what-developers-need-to-know\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.gravityjack.com\/news\/vuforia-unity-for-android-mobile-devices-what-developers-need-to-know\/#primaryimage","url":"https:\/\/www.gravityjack.com\/wp-content\/uploads\/2023\/11\/gj_news_nophoto_.jpg","contentUrl":"https:\/\/www.gravityjack.com\/wp-content\/uploads\/2023\/11\/gj_news_nophoto_.jpg","width":344,"height":194,"caption":"Gravity Jack In the Press"},{"@type":"WebSite","@id":"https:\/\/www.gravityjack.com\/#website","url":"https:\/\/www.gravityjack.com\/","name":"Gravity Jack","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.gravityjack.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.gravityjack.com\/#\/schema\/person\/63c79a7e30c630a69e6e003ef7476fcc","name":"Gravity Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.gravityjack.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/aa3d42e00068a5cdefa39bab3155196c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/aa3d42e00068a5cdefa39bab3155196c?s=96&d=mm&r=g","caption":"Gravity Admin"},"url":"https:\/\/www.gravityjack.com\/author\/gjmagravityjack-com\/"}]}},"_links":{"self":[{"href":"https:\/\/www.gravityjack.com\/wp-json\/wp\/v2\/posts\/1720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gravityjack.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gravityjack.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gravityjack.com\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gravityjack.com\/wp-json\/wp\/v2\/comments?post=1720"}],"version-history":[{"count":0,"href":"https:\/\/www.gravityjack.com\/wp-json\/wp\/v2\/posts\/1720\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gravityjack.com\/wp-json\/wp\/v2\/media\/1506"}],"wp:attachment":[{"href":"https:\/\/www.gravityjack.com\/wp-json\/wp\/v2\/media?parent=1720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gravityjack.com\/wp-json\/wp\/v2\/categories?post=1720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gravityjack.com\/wp-json\/wp\/v2\/tags?post=1720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}