Difference between revisions of "Custom Intent Button"
(Created page with "The Custom Intent Button is a button with special parameters defined. Namely the target class parameter, and the target URI parameter. In order for the Custom Intent Button to...") |
|||
Line 44: | Line 44: | ||
</StartScreenConfiguration> | </StartScreenConfiguration> | ||
</source> | </source> | ||
+ | |||
+ | [[Category:Publishing]] | ||
+ | [[Category:Android]] | ||
+ | [[Category:How-To]] |
Latest revision as of 15:43, 25 March 2015
The Custom Intent Button is a button with special parameters defined. Namely the target class parameter, and the target URI parameter. In order for the Custom Intent Button to work as intended, either the Target Class or Target URI should be specified, but not both. Also they shouldn’t be both undefined for the same button instance.
Target Class
The Target Class parameter is used to specify the name of an activity or an application to launch when the button is clicked. In the case that an internal UBIK® activity is to be launched, the full activity name has to be included. As in the following example.
<Tab caption="AR1">
<CustomIntentButton caption="Maps">
<TargetClass>
com.augmensys.ubik.demo.lib.ui.activities.ar.map.UBIKMapActivityDemo
</TargetClass>
</CustomIntentButton>
</Tab>
</StartScreenConfiguration>
Only the activities that are stated as a main entry point for UBIK® can be used as target classes.
In the case that an application is to be launched, the main entry point class name has to be specified, as in the following example if Skype application is to be launched.
<Tab caption="AR1">
<CustomIntentButton caption="Skype">
<TargetClass>
com.skype.raider.Main
</TargetClass>
</CustomIntentButton>
</Tab>
</StartScreenConfiguration>
Target URI
The target URI parameter, used to specify the URI of the resource to launch when the button is clicked. As in the following example.
<Tab caption="AR1">
<CustomIntentButton caption="Map of Linz" iconPath="linz.png">
<TargetURI>
https://www.google.com/maps/place/Linz/@48.295065,14.327405,12z/data=!3m1!4b1!4m2!3m1!1s0x47739595fa99854d:0x7c53292c577975c4
</TargetURI>
</CustomIntentButton>
</Tab>
</StartScreenConfiguration>