please check that CamActivity inherits from "AbstractArchitectCamActivity", so
@Override
public ArchitectUrlListener getUrlListener() { ...
}
is a valid annotation.
besides that, your code looks good.
Again, please check for difference between your sample and the official sample app, which appears to work without any issue. Also check for JS errors in your console - maybe there is a JS syntax error or other exception happening.
Kind regards
C
Cora Reyes Calens
said
over 9 years ago
This is what I have so far (which is not working at the moment):
public class CameraHandleIssueDetailActivity extends CameraActivity{
public ArchitectUrlListener getUrlListener() { return new ArchitectUrlListener() {
@Override // fetch e.g. document.location = "architectsdk://markerselected?id=1"; public boolean urlWasInvoked(String uriString) { ...
} }; }
}
public class IssueDetailActivity extends Activity {
public static final String EXTRAS_KEY_POI_ID = "id"; public static final String EXTRAS_KEY_POI_TITILE = "title"; public static final String EXTRAS_KEY_POI_DESCR = "description";
Is this correct? Should I add the url listener anythere else?
Thanks for your help.
A
Andreas Fötschl
said
over 9 years ago
Hi again.
Note that you have to register url listener inside the cam-experience to get notified. According your snippet you defined it inside the POI-Detail activity. Please have a look at the "SampleCamHandlePoiDetailActivity.java" in the SDK Samples app, which calls "SamplePoiDetailActivity" after user pressed "more"-button.
Hope that helps, Kind regards
C
Cora Reyes Calens
said
over 9 years ago
Still no changes. My javascript code is the same as the example. In my Detail Activity class I have the following code:
public class MyPoiDetailActivity extends CameraActivity{
public ArchitectUrlListener getUrlListener() {
return new ArchitectUrlListener() {
@Override
// fetch e.g. document.location = "architectsdk://markerselected?id=1";
public boolean urlWasInvoked(String uriString) {
Uri invokedUri = Uri.parse(uriString);
if ("markerselected".equalsIgnoreCase(invokedUri.getHost())) {
final Intent poiDetailIntent = new Intent(CameraHandleIssueDetailActivity.this, IssueDetailActivity.class);
Hi, I'm facing the same problem with the "More" button to display the POI detail in a new Activity. I've copied the Wikitude code to mi own application. This is the only feature that's not working. I've looked at the sample code many times but can't figure this out. I've already overriden the getUrlListener() method.
Am I missing something else?
W
Wolfgang Damm
said
about 10 years ago
Have you modified the example in anyway, or is this occuring with our unmodified SDKSamples application?
If you have copied the example into your own application you will need to register the ArchtiectURLListener in Java. (see SampleCamHandlePoiDetailActivity). If your Activity extends our AbstractArchitectCamActivity it is as simple as overriding the getUrlListener() method.
If you do not extend from the AbstractArchitectCamActivity, just make sure to call
// register valid urlListener in architectView, ensure this // is set before content is loaded to not miss any event this.architectView.registerUrlListener( yourUrlListener );
D
Dimitrios Ververidis
said
about 10 years ago
Hi Wikitude,
I am running "example 5_BrowsingPois_5_NativeDetailScreen" and the "More" Button is doing anything (Wikitude 7.8.2 SDK 3.2 on Android 4.1.2 Samsung Galaxy S3)
About
// user clicked "More" button in POI-detail panel -> fire event to open native screen
onPoiDetailMoreButtonClicked: function onPoiDetailMoreButtonClickedFn() {
Dimitrios Ververidis