Wikitude - I can't use external web service link - wikitude

I'm using Wikitude as my augmented reality mobile app project. My question is why can't I use external web service link? Is it because of trial version?
I'm using this sample from https://github.com/Wikitude/wikitude-phonegap-samples/tree/master/PluginSamples/www/world/5_BrowsingPois_3_LimitingRange
limiting.js
Original source code:
var ServerInformation = {
POIDATA_SERVER: "http://example.wikitude.com/GetSamplePois/",
POIDATA_SERVER_ARG_LAT: "lat",
POIDATA_SERVER_ARG_LON: "lon",
POIDATA_SERVER_ARG_NR_POIS: "nrPois"
};
Edited source code:
var ServerInformation = {
POIDATA_SERVER: "http://staging.revivalx.com/rmbp/branch.json",
POIDATA_SERVER_ARG_LAT: "lat",
POIDATA_SERVER_ARG_LON: "lon",
POIDATA_SERVER_ARG_NR_POIS: "nrPois"
};
Why?

Wikitude only allowed custom external web service if we using premium version.

Related

How to launch external opened app using custom URL scheme from Ionic App?

I want to launch opened app B externally from ionic app A using custom URL scheme.
Solutions Tried
Plugin In App Browser, is able to launch external app in the ionic app itself instead of launching the opened external app.
const target = '_system';
let url = 'abc123://abc.com/mobile/details/' + Id;
const options: InAppBrowserOptions = {
zoom: 'no',
location: 'no',
hidden: 'yes'
};
this.loadingProvider.dismiss();
this.inAppBrowserRef = this.inAppBrowser.create(url, target, options);
Plugin App Launcher. For android, it is able to launch external app but use package name instead of custom URL scheme
I use an anchor tag in my template, and set target="_blank". This is from an Ionic 5 app, but I've only tested in the full iOS build, I don't have an Android one yet. I'm also using Capacitor, but I don't think that changes the browser behavior.
<a [href]="website" target="_blank">{{ website }}</a>
The target="_blank" causes it to open the URL in the main os browser. The main browser should then handle your custom link.
If you have custom URL to open use
window.open('Your URL','_system');
in your code. This can be work in both platform Android and ios Perfectly.

Ionic printer plugin not working on ios for external link

I am trying to print external link into ionic app using ionic printer plugin
https://ionicframework.com/docs/native/printer/
printticket(){
let printurl = "http://www.gmail.com";
let options: PrintOptions = {
name: 'Waridi Events',
duplex: true,
landscape: false,
grayscale: false
};
this.printer.print(printurl, options).then(onSuccess=>{
console.log("Done =>" + onSuccess);
}, onError=>{
console.log("Error=>"+onError);
});
}
This is working on android but not working on ios. Please give me some better way to print.
sometimes it is working
And sometimes failed to load data
Finally I got the solution using api call.
Before call the print call the api from the link and get the html codes and save all into a variable and print it.

Getting error unsupported_response_type

I am working on login with google functionality with $cordovaOauth.google plugin. But I am getting unsupported_response_type error.
$cordovaOauth.google("MY_APP_ID", ["https://www.googleapis.com/auth/urlshortener", "https://www.googleapis.com/auth/userinfo.email"]).then(function (result) {
console.log(JSON.stringify(result));
alert(JSON.stringify(result));
$scope.gdata = result;
}, function (error) {
console.log(error);
});
Where I am making mistake !?
Yes because $cordovaOauth plugin loading webview so you must need web clientID from Google API. And that will not work for ionic ( Mobile app ) so you need to do following things.
First
You need to use schema for your app to give internal URL like google:// or twitter://
Reference : http://mcgivery.com/using-custom-url-schemes-ionic-framework-app/
and provide that custom URL in Google redirect url ( This is not working all time as Google not accept custom URL but you can give it a try ).
Second and Working solution :
You need to create Google app with your app identifier and keytool.
For Android :
https://developers.google.com/identity/sign-in/android/start follow step second and provide your app name and unique identifier ( i.e dipesh.cool.com )
For iOS : 
https://developers.google.com/mobile/add?platform=ios&cntapi=signin
same information as mentioned for android.
Then you need to get REVERSED_CLIENT_ID value from the config file which download will be available once you are done with above two steps ( you can grab it from iOS config file it is easy to find from that file ).
And then simply run below command and code and you will have all working.
Command :
cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=GRAB_THIS_FROM_IOS_OR_ANDROID_CONFIG_FILE
Angular code :
$scope.GoogleLogin = function()
{
$scope.loaderShow('Google');
window.plugins.googleplus.login({},function (obj)
{
window.localStorage.setItem('signin', 'Google');
window.localStorage.setItem('g_uid', obj.userId);
window.localStorage.setItem('g_fname', obj.givenName);
window.localStorage.setItem('g_lname', obj.familyName);
window.localStorage.setItem('user_full_name', obj.displayName);
window.localStorage.setItem('g_email', obj.email);
window.localStorage.setItem('gotPdetails', 'false');
$scope.loaderHide();
$state.go('app.dashboard');
},
function (msg)
{
$scope.showAlert('Google signin Error<br/>'+msg);
$scope.loaderHide();
});
}

How to integrate Facebook SDK into node js?

One benefit of node js that we can use the ready made huge base of javascript libraries? So, I was wondering how to integrate the Facebook sdk at http://connect.facebook.net/en_US/sdk.js into my node project?
I am a bit new to Node so the question might be naive..
You cannot integrate the Facebook SDK directly. There are some libraries at http://npmjs.org which deal with Facebook connectivity, but most of them are quite old.
If you're just looking for Facebook Login integration, https://www.npmjs.org/package/passport-facebook could be a starting point.
I ended up developing my of "library", which is not too complicated because the Facebook Graph API can be used via standard HTTP requests.
Try this .
First do npm install facebook-nodejs-sdk
And then
var connect = require('connect'),
fbsdk = require('facebook-sdk');
connect()
.use(connect.cookieParser())
.use(connect.bodyParser())
.use(fbsdk.facebook({
appId : 'YOUR APP ID',
secret : 'YOUR API SECRET'
}))
.use(function(req, res, next) {
if (req.facebook.getSession()) {
res.end('Logout');
// get my graph api information
req.facebook.api('/profile', function(me) {
console.log(me);
});
} else {
res.end('Login');
}
})
.listen(9000);

google tv HTML5 template video not playing

I have downloaded the HTML5 Template2 for Google TV, I have modified the DataProvider.js file in order to hard-code my videos, video-thumbnails links & info.
This site works very well on a chrome browser when running on a computer.
here is my site
http://mob11.zxq.net/
I made an APK with Phonegap for android and it plays very well for my Nexus7.
However, when I downloaded the same APK to my Visio-Co start google tv buddy box, the app display perfectly but the videos don't play at all.
Also When I try to go on my site using the chrome browser inside google tv, the site itself display properly, but again the videos don't play.
This is a sample of what my dataProvider.js looks like
var gtv = gtv || {
jq: {}
};
/** * DataProvider class. Defines a provider for all data (Categories, Images & Videos) shown in the template.
*/
gtv.jq.DataProvider = function() {
};
var x = new gtv.jq.DataProvider();
gtv.jq.DataProvider.prototype.getData = function() {
var tourism = [
{
sources:
['https://s3.amazonaws.com/besthaitivids/tourism/welcometohaiti.mp4'],
title: 'Welcome to Haiti',
thumb: 'https://s3.amazonaws.com/besthaitipic/tourism/touristlogo.jpg',
description: ['Bienvenue en Haiti'],
subtitle: 'La Perle des antilles'
}
];
var data = {
categories: [
{
name: 'Tourisim',
videos: tourism
}
]
};
How can I make the videos play on chrome when I access my site inside google tv?
How can I make the videos play in my Google APK APP installed on my Visio-costar google tv?
Any help will be greatly appreciate thanks so much.