Wikitude
play_for_work
Forum
FAQ
Documentation
Download
wikitude.com
How can we help you today?
Enter your search term here...
Search
Start a new topic
Discussions
Wikitude SDK (Android, iOS, UWP)
Wikitude SDK Questions or Problems
How to display POI
H
Hemraj Rijal
started a topic
over 6 years ago
How to display POI
2 Comments
Oldest First
Popular
Newest First
Sorted by
Oldest First
H
Hemraj Rijal
said
over 6 years ago
As i know first all of we should have wikituded provided javascript file in asset folder along with json to load from from local resource bt as run the project only camera open with watermark of wikitude but not showing POI availabel at Json.
package com.example.hemraj.mallinfo_v20;
import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AppCompatActivity;
import android.widget.Toast;
import com.example.hemraj.mallinfo_v20.util.Constant;
import com.wikitude.architect.ArchitectView;
import com.wikitude.architect.StartupConfiguration;
import java.io.IOException;
/**
* Created by Hemraj on 9/26/2016.
*/
public class CamActivity extends AppCompatActivity {
private static final int WIKITUDE_PERMISSIONS = 1;
private ArchitectView architectView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
String permissions = new String{
Manifest.permission.CAMERA,
Manifest.permission.ACCESS_FINE_LOCATION,
Manifest.permission.ACCESS_COARSE_LOCATION
};
ActivityCompat.requestPermissions(this, permissions, WIKITUDE_PERMISSIONS);
setContentView(R.layout.activity_architect);
this.architectView = (ArchitectView)this.findViewById( R.id.architectView );
final StartupConfiguration config = new StartupConfiguration(Constant.TRIAL_KEY);
this.architectView.onCreate( config );
}
@Override
protected void onPostCreate(Bundle savedInstanceState){
super.onPostCreate(savedInstanceState);
architectView.onPostCreate();
try {
this.architectView.load( "file:///assets/index.html" );
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
protected void onResume(){
super.onResume();
architectView.onResume();
}
@Override
protected void onDestroy(){
super.onDestroy();
architectView.onDestroy();
}
@Override
protected void onPause(){
super.onPause();
architectView.onPause();
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String permissions, @NonNull int grantResults) {
if (requestCode == WIKITUDE_PERMISSIONS) {
if (grantResults.length > 0 && grantResults == PackageManager.PERMISSION_GRANTED) {
this.startActivity(new Intent(this, ArchitectActivity.class));
} else {
Toast.makeText(this, R.string.permissions_denied, Toast.LENGTH_LONG).show();
}
}
}
}
Can any one help me to display POI at my camera??
And this is my json
var myJsonData = ;
Regards,
Hemraj
D
Daniel Guttenberg
said
over 6 years ago
Hi Hemraj,
it seems to me you are trying replicate the behaviour of the POI from local resource sample quite closely. Did you follow the steps listed at
http://www.wikitude.com/external/doc/documentation/latest/ios/retrievingpoidata.html#local
exactly?
1. putting a valid JSON file containing your POI data into the assets folder of your ARchitect world
2. defining the POI data as a global variable
3. including your JSON file using a <script> tag in the index.html file of your sample world
4. using your POI data as demonstrated in
https://github.com/Wikitude/wikitude-sdk-samples/blob/master/5_ObtainPoiData_2_FromLocalResource/js/fromlocalresource.js#L103-L114
Kind regards
Daniel
Login
or
Signup
to post a comment
More topics in
Wikitude SDK Questions or Problems
Instatiation of WTArchitectView compile errors
Point of interest - native iOS
Slider
Camera lagging / slow in native Swift application
Create a web service
N-th ImageDrawable not displayed
Radar Example
stop defaultlocationmanager and use architectview.injectlocation ios 10
WTC Size Limit
AngularJS and wikitude
See all 3869 topics
© 2021 Wikitude, a Qualcomm company
Hemraj Rijal