Changes
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..."
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.
<source lang="xml">
<StartScreenConfiguration>
<Tab caption="AR1">
<CustomIntentButton caption="Maps">
<TargetClass>
com.augmensys.ubik.demo.lib.ui.activities.ar.map.UBIKMapActivityDemo
</TargetClass>
</CustomIntentButton>
</Tab>
</StartScreenConfiguration>
</source>
Only the activities that are stated as a main entry point for {{UBIK}} can be used as target classes. <br/>
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.
<source lang="xml">
<StartScreenConfiguration>
<Tab caption="AR1">
<CustomIntentButton caption="Skype">
<TargetClass>
com.skype.raider.Main
</TargetClass>
</CustomIntentButton>
</Tab>
</StartScreenConfiguration>
</source>
== 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.
<source lang="xml">
<StartScreenConfiguration>
<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>
</source>
== 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.
<source lang="xml">
<StartScreenConfiguration>
<Tab caption="AR1">
<CustomIntentButton caption="Maps">
<TargetClass>
com.augmensys.ubik.demo.lib.ui.activities.ar.map.UBIKMapActivityDemo
</TargetClass>
</CustomIntentButton>
</Tab>
</StartScreenConfiguration>
</source>
Only the activities that are stated as a main entry point for {{UBIK}} can be used as target classes. <br/>
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.
<source lang="xml">
<StartScreenConfiguration>
<Tab caption="AR1">
<CustomIntentButton caption="Skype">
<TargetClass>
com.skype.raider.Main
</TargetClass>
</CustomIntentButton>
</Tab>
</StartScreenConfiguration>
</source>
== 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.
<source lang="xml">
<StartScreenConfiguration>
<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>
</source>