Just followed the simple steps
1. scaffold an app using below comman
yo oraclejet:hybrid app --appname="testapp" --template=navbar --platform=android
-
Added a button in about.html file
<form class="demo-signin-form oj-hybrid-padding-vertical" method="post" name="signInForm">
\<div class="oj-hybrid-padding-top">
\<button id="signInBtn" class="demo-signin-button oj-hybrid-padding-horizontal oj-button-jqui oj-button oj-component oj-enabled oj-button-full-chrome oj-button-text-only oj-component-initnode oj-default" data-bind="click: callRestAPI, ojComponent: {component:'ojButton', label: 'Sign In', chroming: 'full'}" aria-labelledby="ui-id-6">\<div class="oj-button-label">\<span class="oj-button-text" id="ui-id-6">Sign In\</span>\</div>\</button>
\</div>
\</form>
3.edited the about.js file with AJAX REST API call
callRestAPI=function(){
$.ajax(
{
url: "[https://XXXXXXXXXXXXXX/services/rest/connect/v1.3/accounts](https://XXXXXXXXXXXXXX/services/rest/connect/v1.3/accounts)",
type: 'GET',
headers:{
'Content-Type': 'application/json',
'authorization': 'Basic XXXXXXXXXXXXXXXXX'
},
success: function(data)
{
var json = JSON.stringify($.parseJSON(data));
var people = JSON.parse(json);
alert(JSON.stringify(people));
alert("success");
},error:function(error)
{
alert("error");
}
})
}
when i run in brower its showing
XMLHttpRequest cannot load https://XXXXXXXXXXXXXXXXXXXXXXXXXXXX/services/rest/connect/v1.3/accounts.
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8383' is therefore not allowed access. The response had HTTP status code 401.

I am able to call the REST service from Advanced Rest Client and able to invoke it directly from browser. Let me know if I am missing something like proxy.
I have deployed it as Android APK but I am still getting the same error.
Thanks
Vinoth