'PlusClass' is obsolete - xamarin.android

When initializing GoogleApiClient, I get this warning:
'PlusClass' is obsolete: 'This class is obsoleted in this android
platform'
What are its alternative?
Code:
mGoogleApiClient = new GoogleApiClient.Builder(this)
.AddConnectionCallbacks(this)
.AddOnConnectionFailedListener(this)
.AddApi(PlusClass.API)
.AddScope(new Scope(Scopes.Profile))
.Build();
Version:
<package id="Xamarin.GooglePlayServices.Base" version="42.1001.0" targetFramework="monoandroid71" />
<package id="Xamarin.GooglePlayServices.Basement" version="42.1001.0" targetFramework="monoandroid71" />
<package id="Xamarin.GooglePlayServices.Plus" version="42.1001.0" targetFramework="monoandroid71" />
<package id="Xamarin.GooglePlayServices.Tasks" version="42.1001.0" targetFramework="monoandroid71" />

I had the same problem and after a lot of digging around and reverse engineering java examples I arrived at the code below.
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn)
.RequestProfile()
.Build();
_GoogleApiClient = new GoogleApiClient.Builder(this)
.AddConnectionCallbacks(this)
.AddOnConnectionFailedListener(this)
.AddApi(Auth.GOOGLE_SIGN_IN_API, gso)
.Build();
}
Packages
<package id="Xamarin.GooglePlayServices.Auth" version="42.1001.0" targetFramework="monoandroid71" />
<package id="Xamarin.GooglePlayServices.Auth.Base" version="42.1001.0" targetFramework="monoandroid71" />
<package id="Xamarin.GooglePlayServices.Base" version="42.1001.0" targetFramework="monoandroid70" />
<package id="Xamarin.GooglePlayServices.Basement" version="42.1001.0" targetFramework="monoandroid70" />
<package id="Xamarin.GooglePlayServices.Location" version="42.1001.0" targetFramework="monoandroid70" />
<package id="Xamarin.GooglePlayServices.Plus" version="42.1001.0" targetFramework="monoandroid71" />
<package id="Xamarin.GooglePlayServices.Tasks" version="42.1001.0" targetFramework="monoandroid70" />

Related

Uncaught TypeError: Cannot read property 'diagnostic' of undefined on Phonegap

In my Phonegap project the Diagnostic plugin gives the following error!
Uncaught TypeError: Can not read property 'diagnostic' of undefined
I have already virified the versions, uninstalled and installed the plugin. And this always happens, I've even been isolated from other plugins!
var structureApp = {
initialize: function(){
this.bindEvents();
},
bindEvents: function() {
document.addEventListener('deviceready', this.onDeviceReady, false);
document.addEventListener("deviceRegistered", this.successDeviceRegistered, false);
},
onDeviceReady: function() {
structureApp.mount();
navigator.geolocation.getCurrentPosition(
structureApp.geoLocate,
structureApp.geoErro,
{enableHighAccuracy:true, maximumAge:30000, timeout:27000}
);
.structureApp.getPosition();
},
mount: function() {
structureApp.logoutNotification();
},
geoLocate: function(position){
var lat=position.coords.latitude;
var lon=position.coords.longitude;
localStorage.setItem('lat',lat);
localStorage.setItem('lon',lon);
$("#latitude").html("Sua Latidute:" + lat);
$("#longitude").html("Sua Longitude:" + lon);
},
geoErro: function (e){
alert("Houve um erro:" + e.message);
},
getPosition: function (){
cordova.plugins.diagnostic.isLocationAuthorized(function(enabled){
if(!enabled){
navigator.diagnostic.requestLocationAuthorization(function(status){
navigator.geolocation.getCurrentPosition(function(position){
alert(position.coords.latitude, position.coords.longitude);
startSplash();
}, function(error){
alert("Something went wrong while retrieving your position. " + error.message);
},
{
maximumAge:6000,
timeout:5000,
enableHighAccuracy: true
});
},function(error){
alert(error.message);
});
}
},function(error){
alert("The following error occurred: " + error.message);
});
}
};
$(function(){ structureApp.initialize(); });
My config.xml looks like this:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.phonegap.meuapp" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
<name>MeuAPP</name>
<description>
######
</description>
<author email="" href="">
########
</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<allow-navigation href="*" />
<preference name="orientation" value="default" />
<preference name="phonegap-version" value="cli-6.5.0" />
<preference name="android-build-tool" value="ant|gradle" />
<preference name="android-minSdkVersion" value="10" />
<preference name="android-maxSdkVersion" value="24" />
<preference name="android-targetSdkVersion" value="12" />
<preference name="android-windowSoftInputMode" value="stateVisible|adjustResize" />
<platform name="android">
<config-file parent="/*" target="AndroidManifest.xml">
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
</config-file>
</platform>
<platform name="ios">
<plugin name="cordova-plugin-background-fetch" spec="*" />
<config-file parent="UIBackgroundModes" platform="ios" target="*-Info.plist">
<array>
<string>fetch</string>
<string>remote-notification</string>
</array>
</config-file>
</platform>
<platform name="windows">
<preference name="windows-target-version" value="10.0" />
<preference name="target-device" value="universal" />
<preference name="Windows.Universal-MinVersion" value="10.0.0.0" />
</platform>
<engine name="ios" spec="~4.5.5" />
<engine name="windows" spec="latest" />
<engine name="android" spec="^7.0.0" />
<plugin name="cordova-plugin-dialogs" spec="~2.0.1" />
<plugin name="cordova-plugin-file-transfer" spec="~1.7.1" />
<plugin name="cordova-plugin-geolocation" spec="~4.0.1" />
<plugin name="cordova-plugin-request-location-accuracy" spec="^2.2.3" />
<plugin name="cordova-android-support-gradle-release" spec="^1.4.4">
<variable name="ANDROID_SUPPORT_VERSION" value="25.+" />
</plugin>
<plugin name="cordova.plugins.diagnostic" spec="^4.0.10" />
</widget>
Can someone help me?

phonegap app using handlebars.js (list view) not registering touch on iOS

i am building an app using phonegap, handlebars.js (for templating). I have a js list where i iterate though to show information of each element of the list using handlebars.js templates. there is a click event registered for each element of the list.
######### javascript code #####################
$('body').on('click', 'div.payment_tab', function(event) {
event.preventDefault();
if(self.allowclick==1) {
document.location=$(this).attr("data-target");
return false;
} else {
console.log("else for clicking the payment tab. allowclick is not 1");
return false;
}
});
$('body').on('click' , 'div.payment-checkbox', function(event) {
event.preventDefault();
$(this).toggleClass('checked');
$(this).toggleClass('unchecked');
$(this).parent().find('.invoice_amount').toggleClass('added');
$(this).parent().find('.invoice_amount').toggleClass('notadded');
var amounts = $('div.payment-amount-status .added');
var total = 0.00;
amounts.each(function(key,value) {
if($(value).text() != "") {
total += parseFloat($(value).text());
}
});
$('#amount_to_pay').text(total.toFixed(2));
});
######swipe event javascript######
$("#invoicesView").swipe( {
swipeStatus:function(event, phase, direction, distance, duration, fingers)
{
if (phase=="start")
{
app.allowclick=0;
}
if (phase=="cancel")
{
app.allowclick=1;
}
},
swipeDown:function(event, direction, distance, duration)
{
//Only Let swipe, if the Element is at the very top of the scroll
if($("#invoicesView .contentholder").scrollTop()<=40 && distance>40 )
{
app.allowclick=0;
app.get_payment_details();
}
},
swipeRight:function(event, direction, distance, duration)
{
},
swipeLeft:function(event, direction, distance, duration)
{
},
threshold:50,
cancelThreshold:50,
allowPageScroll:"vertical"
});
###### part of the main.html (handlebars.js template)############################
<script id="invoices-li-tpl" type="text/x-handlebars-template">
{{#.}}
<li>
<div class="payment-checkbox checked"></div>
<div class="payment_tab" data-target="#invoices/{{{this.payment_id}}}">
<div class='payment_info'>
<p>ORDER #:
<span class="invoice-info-order">{{this.order_num}}</span>
</p>
<p>PO:
{{#if this.customer_po}}
<span class="invoice-info-po">{{this.customer_po}}</span></p>
{{else}}
<span class="invoice-info-po">N/A</span>
{{/if}}
<p>DATE:
<span class="invoice-info-date">{{this.createdtime}}</span>
</p>
</div>
<div class='payment-amount-status {{this.paid}}'>
<p><span class ='invoice-amount-label'>TOTAL:</span>$<span class='invoice_amount added'>{{this.amount}}</span></p>
<p><span class ='invoice-status-label'>STATUS:</span><span>{{this.paid}}</span></p>
<p class='payment_id'>{{this.payment_id}}</p>
</div>
<div class='clearfix'></div>
</div>
</li>
{{/.}}
</script>
In the bundled app, the click event works fine on android but does not work on iOS (version 10,tested on iphone 6+). Even the checkbox click(div.payment-checkbox) is not registered on ios. Below is the config.xml i am using for the app. note that we have a similar list view in the app where the click event works on ios.
######## config.xml #########################
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="xxx" id="xxxxxxx" ios-CFBundleVersion="3.0.1" version="3.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" >
<name>xxxxx</name>
<description>
xxxxxx
</description>
<author email="xxx#xxxxx.com" href="xxxxxx">
xxxxxxxx
</author>
<content src="index.html" />
<preference name="deployment-target" value="7.0" />
<preference name="permissions" value="none" />
<preference name="orientation" value="portrait" />
<preference name="target-device" value="handset" />
<preference name="fullscreen" value="false" />
<preference name="webviewbounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="prerendered-icon" value="true" />
<preference name="stay-in-webview" value="false" />
<preference name="ios-statusbarstyle" value="black-opaque" />
<preference name="detect-data-types" value="true" />
<preference name="exit-on-suspend" value="false" />
<preference name="show-splash-screen-spinner" value="false" />
<preference name="disable-cursor" value="false" />
<preference name="android-minSdkVersion" value="14" />
<preference name="android-installLocation" value="auto" />
<gap:plugin name="cordova-plugin-console" source="npm" />
<gap:plugin name="cordova-plugin-device" source="npm" />
<gap:plugin name="cordova-plugin-dialogs" source="npm" />
<gap:plugin name="cordova-plugin-splashscreen" source="npm" />
<gap:plugin name="cordova-plugin-inappbrowser" source="npm" />
<gap:plugin name="cordova-plugin-customurlscheme" source="npm">
<param name="URL_SCHEME" value="xxxxx" />
</gap:plugin>
<feature name="SplashScreen">
<param name="ios-package" value="CDVSplashScreen"/>
<param name="onload" value="true" />
</feature>
<feature name="SplashScreen">
<param name="android-package" value="org.apache.cordova.splashscreen.SplashScreen" />
</feature>
<feature name="InAppBrowser">
<param name="android-package" value="org.apache.cordova.inappbrowser.InAppBrowser" />
</feature>
<feature name="InAppBrowser">
<param name="ios-package" value="CDVInAppBrowser" />
</feature>
<feature name="Device">
<param name="android-package" value="org.apache.cordova.device.Device" />
</feature>
<icon src="icon.png" />
<icon src="res/icon/android/ldpi.png" gap:platform="android" gap:qualifier="ldpi" />
<icon src="res/icon/android/mdpi.png" gap:platform="android" gap:qualifier="mdpi" />
<icon src="res/icon/android/hdpi.png" gap:platform="android" gap:qualifier="hdpi" />
<icon src="res/icon/android/xhdpi.png" gap:platform="android" gap:qualifier="xhdpi" />
<icon src="res/icon/android/xxhdpi.png" gap:platform="android" gap:qualifier="xxhdpi" />
<!-- iPhone / iPod Touch -->
<icon src="res/icon/ios/icon-60.png" gap:platform="ios" width="60" height="60" />
<icon src="res/icon/ios/icon-60#2x.png" gap:platform="ios" width="120" height="120" />
<icon src="res/icon/ios/icon-60#3x.png" gap:platform="ios" width="180" height="180" />
<!-- iPad -->
<icon src="res/icon/ios/icon-76.png" gap:platform="ios" width="76" height="76" />
<icon src="res/icon/ios/icon-76#2x.png" gap:platform="ios" width="152" height="152" />
<!-- Settings Icon -->
<icon src="res/icon/ios/icon-small.png" gap:platform="ios" width="29" height="29" />
<icon src="res/icon/ios/icon-small#2x.png" gap:platform="ios" width="58" height="58" />
<!-- Spotlight Icon -->
<icon src="res/icon/ios/icon-40.png" gap:platform="ios" width="40" height="40" />
<icon src="res/icon/ios/icon-40#2x.png" gap:platform="ios" width="80" height="80" />
<!-- iPhone / iPod Touch -->
<icon src="res/icon/ios/icon.png" gap:platform="ios" width="57" height="57" />
<icon src="res/icon/ios/icon#2x.png" gap:platform="ios" width="114" height="114" />
<!-- iPad -->
<icon src="res/icon/ios/icon-72.png" gap:platform="ios" width="72" height="72" />
<icon src="res/icon/ios/icon-72#2x.png" gap:platform="ios" width="144" height="144" />
<!-- iPad Spotlight and Settings Icon -->
<icon src="res/icon/ios/icon-50.png" gap:platform="ios" width="50" height="50" />
<icon src="res/icon/ios/icon-50#2x.png" gap:platform="ios" width="100" height="100" />
<gap:splash src="splash.png" />
<gap:splash gap:platform="android" gap:qualifier="port-ldpi" src="www/res/screen/android/android_ldpi_portrait.png" />
<gap:splash gap:platform="android" gap:qualifier="port-mdpi" src="www/res/screen/android/android_mdpi_portrait.png" />
<gap:splash gap:platform="android" gap:qualifier="port-hdpi" src="www/res/screen/android/android_hdpi_portrait.png" />
<gap:splash gap:platform="android" gap:qualifier="port-xhdpi" src="www/res/screen/android/android_xhdpi_portrait.png" />
<gap:splash gap:platform="blackberry" src="www/res/screen/blackberry/screen-225.png" />
<gap:splash src="res/screen/ios/Default.png" gap:platform="ios" width="320" height="480" />
<gap:splash src="res/screen/ios/Default#2x.png" gap:platform="ios" width="640" height="960" />
<gap:splash src="res/screen/ios/screen/ios/Default#3x.png" gap:platform="ios" width="960" height="1440" />
<!-- iPhone 5 / iPod Touch (5th Generation) -->
<gap:splash src="res/screen/ios/Default-568h#2x.png" gap:platform="ios" width="640" height="1136" />
<!-- iPad -->
<gap:splash src="res/screen/ios/Default-portrait-ipad.png" gap:platform="ios" width="768" height="1024" />
<gap:splash src="res/screen/ios/Default-landscape-ipad.png" gap:platform="ios" width="1024" height="768" />
<!-- Retina iPad -->
<gap:splash src="res/screen/ios/Default-Portrait#2x.png" gap:platform="ios" width="1536" height="2048" />
<gap:splash src="res/screen/ios/Default-Landscape#2x.png" gap:platform="ios" width="2048" height="1536" />
<gap:splash gap:platform="winphone" src="www/res/screen/windows-phone/screen-portrait.jpg" />
<platform name="ios">
<gap:plugin name="phonegap-plugin-push" spec="1.5.3" source="npm">
<params>
<param name="SENDER_ID" value="xxxxxxxx" />
</params>
</gap:plugin>
</platform>
<platform name="android">
<gap:plugin name="phonegap-plugin-push" spec="1.7.2" source="npm">
<params>
<param name="SENDER_ID" value="xxxxxxx" />
</params>
</gap:plugin>
</platform>
<gap:plugin name="cordova-plugin-whitelist" source="npm" />
<access origin="*" />
<access origin="http://*" />
<access origin="https://*" />
<plugin name="cordova-plugin-whitelist" version="1" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="5000" />
<preference name="auto-hide-splash-screen" value="true" />
<preference name="AutoHideSplashScreen" value="true" />
<access origin="*"/>
</widget>

Execute code after function execution in angularjs

I'm making application for iOS using Phonegap with SQLite.
In deviceready(), I'm loading SQLite table from the JSON file.
CODE:
document.addEventListener("deviceready", onDeviceReady, false);
var db;
function onDeviceReady() {
try
{
window.requestFileSystem(LocalFileSystem.PERSISTENT, 2048*1024, FileIO.gotFS, FileIO.errorHandler);
db = window.sqlitePlugin.openDatabase({ name: "ValeDB", location: 1 });
db.transaction(function(tx) {
tx.executeSql('DROP TABLE IF EXISTS tbl_Location');
tx.executeSql('DROP TABLE IF EXISTS tbl_OrgUnit');
tx.executeSql('CREATE TABLE IF NOT EXISTS tbl_Location (id integer, value text)');
tx.executeSql('CREATE TABLE IF NOT EXISTS tbl_OrgUnit (id integer, value text, type text)');
LocationList.forEach(function(loc){
//console.log(loc.value);
tx.executeSql("INSERT INTO tbl_Location (id, value) VALUES (?, ?)", [loc.id, loc.value],
function(tx, res){
//console.log("Success: " + res.insertId);
},
function(e){
console.log("Error: " + e.message);
});
});
tx.executeSql("SELECT COUNT(*) AS Count FROM tbl_Location", [], function(tx, res){
if(res.rows.length > 0)
console.log("New rows added to tbl_Location:" + res.rows.item(0).Count);
});
EnglishOrgUnit.forEach(function(org){
//console.log(loc.value);
tx.executeSql("INSERT INTO tbl_OrgUnit (id, value, type) VALUES (?, ?, ?)", [org.id, org.value, "en"],
function(tx, res){
//console.log("Success: " + res.insertId);
},
function(e){
console.log("Error: " + e.message);
});
});
tx.executeSql("SELECT COUNT(*) AS Count FROM tbl_OrgUnit WHERE TYPE = 'en'", [], function(tx, res){
if(res.rows.length > 0)
console.log("New Eng. rows added to tbl_OrgUnit:" + res.rows.item(0).Count);
});
PortugueseOrgUnit.forEach(function(org){
//console.log(loc.value);
tx.executeSql("INSERT INTO tbl_OrgUnit (id, value, type) VALUES (?, ?, ?)", [org.id, org.value, "pt"],
function(tx, res){
//console.log("Success: " + res.insertId);
},
function(e){
console.log("Error: " + e.message);
});
});
tx.executeSql("SELECT COUNT(*) AS Count FROM tbl_OrgUnit WHERE TYPE = 'pt'", [], function(tx, res){
if(res.rows.length > 0)
console.log("New Port. rows added to tbl_OrgUnit:" + res.rows.item(0).Count);
});
});
}
catch(e)
{
console.log("Error:" + e.message)
}
}
Config:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.Vale.Incident" version="1.1.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
<preference name="AllowInlineMediaPlayback" value="false" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="BackupWebStorage" value="cloud" />
<preference name="DisallowOverscroll" value="true" />
<preference name="EnableViewportScale" value="false" />
<preference name="FadeSplashScreen" value="true" />
<preference name="FadeSplashScreenDuration" value=".25" />
<preference name="KeyboardDisplayRequiresUserAction" value="true" />
<preference name="MediaPlaybackRequiresUserAction" value="false" />
<preference name="ShowSplashScreenSpinner" value="true" />
<preference name="SuppressesIncrementalRendering" value="false" />
<preference name="TopActivityIndicator" value="gray" />
<preference name="GapBetweenPages" value="0" />
<preference name="PageLength" value="0" />
<preference name="PaginationBreakingMode" value="page" />
<preference name="PaginationMode" value="unpaginated" />
<preference name="webviewbounce" value="false" />
<feature name="LocalStorage">
<param name="ios-package" value="CDVLocalStorage" />
</feature>
<name>ReportIncident</name>
<description>
Hello World sample application that responds to the deviceready event.
</description>
<author email="support#phonegap.com" href="http://phonegap.com">
PhoneGap Team
</author>
<preference name="permissions" value="none" />
<preference name="phonegap-version" value="3.5.0" />
<preference name="orientation" value="default" />
<preference name="target-device" value="universal" />
<preference name="fullscreen" value="true" />
<preference name="webviewbounce" value="true" />
<preference name="prerendered-icon" value="true" />
<preference name="stay-in-webview" value="false" />
<preference name="ios-statusbarstyle" value="blue" />
<preference name="detect-data-types" value="true" />
<preference name="exit-on-suspend" value="false" />
<preference name="show-splash-screen-spinner" value="true" />
<preference name="auto-hide-splash-screen" value="true" />
<preference name="disable-cursor" value="false" />
<preference name="android-minSdkVersion" value="7" />
<preference name="android-installLocation" value="auto" />
<preference name="AutoHideSplashScreen" value="false" />
<gap:plugin name="org.apache.cordova.battery-status" />
<gap:plugin name="org.apache.cordova.camera" />
<gap:plugin name="org.apache.cordova.media-capture" />
<gap:plugin name="org.apache.cordova.console" />
<gap:plugin name="org.apache.cordova.contacts" />
<gap:plugin name="org.apache.cordova.device" />
<gap:plugin name="org.apache.cordova.device-motion" />
<gap:plugin name="org.apache.cordova.device-orientation" />
<gap:plugin name="org.apache.cordova.dialogs" />
<gap:plugin name="org.apache.cordova.file" />
<gap:plugin name="org.apache.cordova.file-transfer" />
<gap:plugin name="org.apache.cordova.geolocation" />
<gap:plugin name="org.apache.cordova.globalization" />
<gap:plugin name="org.apache.cordova.inappbrowser" />
<gap:plugin name="org.apache.cordova.media" />
<gap:plugin name="org.apache.cordova.network-information" />
<gap:plugin name="org.apache.cordova.splashscreen" />
<gap:plugin name="org.apache.cordova.vibration" />
<!--gap:plugin name="com.millerjames01.sqlite-plugin"-->
<!--plugin name="SQLitePlugin" value="SQLitePlugin" /-->
<icon src="icon.png" />
<icon gap:platform="android" gap:qualifier="ldpi" src="res/icon/android/icon-36-ldpi.png" />
<icon gap:platform="android" gap:qualifier="mdpi" src="res/icon/android/icon-48-mdpi.png" />
<icon gap:platform="android" gap:qualifier="hdpi" src="res/icon/android/icon-72-hdpi.png" />
<icon gap:platform="android" gap:qualifier="xhdpi" src="res/icon/android/icon-96-xhdpi.png" />
<icon gap:platform="blackberry" src="res/icon/blackberry/icon-80.png" />
<icon gap:platform="blackberry" gap:state="hover" src="res/icon/blackberry/icon-80.png" />
<icon gap:platform="ios" height="57" src="res/icon/ios/vale-57.png" width="57" />
<icon gap:platform="ios" height="72" src="res/icon/ios/vale-72.png" width="72" />
<icon gap:platform="ios" height="114" src="res/icon/ios/vale-114.png" width="114" />
<icon gap:platform="ios" height="144" src="res/icon/ios/vale-144.png" width="144" />
<icon gap:platform="webos" src="res/icon/webos/icon-64.png" />
<icon gap:platform="winphone" src="res/icon/windows-phone/icon-48.png" />
<icon gap:platform="winphone" gap:role="background" src="res/icon/windows-phone/icon-173.png" />
<gap:splash gap:platform="android" gap:qualifier="port-ldpi" src="res/screen/android/screen-ldpi-portrait.png" />
<gap:splash gap:platform="android" gap:qualifier="port-mdpi" src="res/screen/android/screen-mdpi-portrait.png" />
<gap:splash gap:platform="android" gap:qualifier="port-hdpi" src="res/screen/android/screen-hdpi-portrait.png" />
<gap:splash gap:platform="android" gap:qualifier="port-xhdpi" src="res/screen/android/screen-xhdpi-portrait.png" />
<gap:splash gap:platform="blackberry" src="res/screen/blackberry/screen-225.png" />
<gap:splash gap:platform="ios" height="480" src="res/screen/ios/splash5-320-480.png" width="320" />
<gap:splash gap:platform="ios" height="960" src="res/screen/ios/splash5-320-480.png" width="640" />
<gap:splash gap:platform="ios" height="1136" src="res/screen/ios/splash5-320-480.png" width="640" />
<gap:splash gap:platform="ios" height="1024" src="res/screen/ios/splash5-320-480.png" width="768" />
<gap:splash gap:platform="ios" height="768" src="res/screen/ios/splash5-320-480.png" width="1024" />
<gap:splash gap:platform="winphone" src="res/screen/windows-phone/screen-portrait.jpg" />
<gap:plugin name="org.apache.cordova.statusbar" version="0.1.4" />
<gap:plugin name="nl.x-services.plugins.videocaptureplus" />
<access origin="*" />
<feature name="Camera">
<param name="ios-package" value="CDVCamera" />
</feature>
<feature name="Notification">
<param name="ios-package" value="CDVNotification" />
</feature>
<preference name="CameraUsesGeolocation" value="false" />
<feature name="Vibration">
<param name="ios-package" value="CDVVibration" />
</feature>
<feature name="File">
<param name="ios-package" value="CDVFile" />
<param name="onload" value="true" />
</feature>
<feature name="Capture">
<param name="ios-package" value="CDVCapture" />
</feature>
<feature name="NetworkStatus">
<param name="ios-package" value="CDVConnection" />
</feature>
<plugin name="Notification" value="CDVNotification" />
<feature name="FileTransfer">
<param name="ios-package" value="CDVFileTransfer" />
</feature>
<feature name="File">
<param name="ios-package" value="CDVFile" />
</feature>
<feature name="InAppBrowser">
<param name="ios-package" value="CDVInAppBrowser" />
</feature>
<feature name="Globalization">
<param name="ios-package" value="CDVGlobalization" />
</feature>
<feature name="Media">
<param name="ios-package" value="CDVSound" />
</feature>
<feature name="Console">
<param name="ios-package" value="CDVLogger" />
</feature>
<feature name="VideoCapturePlus">
<param name="ios-package" value="VideoCapturePlus" />
</feature>
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar" />
</feature>
<feature name="Device">
<param name="ios-package" value="CDVDevice" />
</feature>
<feature name="SQLitePlugin">
<param name="ios-package" value="SQLitePlugin" />
</feature>
<plugin name="SQLitePlugin" value="SQLitePlugin" />
</widget>
Problem:
Before the tables are completely loaded, the User is redirected to the Login page
Expected:
User is redirected to the Login page, only once the data is completely loaded. Till that time the Splash screen should be displayed to the user.
Any idea how to go about it
Thanks in advance
In your config.xml add this line
<preference name="AutoHideSplashScreen" value="false" />
And use this function in your js when you want to hide splashscree
navigator.splashscreen.hide();

End point not found in WCF Service

When i test my WCFservice's method by putting as query string in address bar it shows only "Endpoint not found.".Please help me where i am wrong? But a simple test method to add two numbers is running properly.I am running it on localhost.Below is my web.config
<connectionStrings>
<add name="ES_SecurityContext" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=dev_Scheduler;Integrated Security=SSPI;" providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5.1" />
<httpRuntime targetFramework="4.5.1" executionTimeout="1599999" />
<customErrors mode="Off"/>
<membership defaultProvider="simple">
<providers>
<add name="simple" type="WebMatrix.WebData.SimpleMembershipProvider, WebMatrix.WebData"/>
</providers>
</membership>
</system.web>
<system.serviceModel>
<services>
<!--<service name="Cygnus.Dev.JobDispatcherWCFService.JobDispatcherWcf">
<endpoint address="" behaviorConfiguration="restfulBehavior" binding="webHttpBinding" bindingConfiguration="web" contract="Cygnus.Dev.JobDispatcherWCFService.IJobDispatcherWcf"></endpoint>
</service>-->
<service name="SchedulerWcf.Scheduler" behaviorConfiguration="ServiceBehavior">
<!--<host>
<baseAddresses>
<add baseAddress=""/>
</baseAddresses>
</host>-->
<endpoint binding="webHttpBinding" contract="SchedulerWcf.IScheduler" behaviorConfiguration="webHttp"/>
<endpoint address="mex" binding="mexHttpBinding" contract="SchedulerWcf.IScheduler" />
</service>
</services>
<behaviors>
<!--<endpointBehaviors>
<behavior name="restfulBehavior">
<webHttp helpEnabled="true"/>
</behavior>
</endpointBehaviors>-->
<serviceBehaviors>
<behavior name="ServiceBehavior" >
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="webHttp">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="false" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="true"/>
</system.webServer>
</configuration>
below is the code of WCF Service
public class Scheduler : IScheduler
{
#region [Constructors]
public Scheduler()
{
if (!WebSecurity.Initialized)
WebSecurity.InitializeDatabaseConnection("ES_SecurityContext", "UserProfile", "UserId", "UserName", autoCreateTables: true);
}
#endregion
#region [Ping Test Methods]
public string GetSum(int x, int y)
{
return new JavaScriptSerializer().Serialize(new { sum = x + y, message = "This is sum" });
}
#endregion
#region [Methods]
public CompositeType GetDataUsingDataContract(CompositeType composite)
{
if (composite == null)
{
throw new ArgumentNullException("composite");
}
if (composite.BoolValue)
{
composite.StringValue += "Suffix";
}
return composite;
}

InAppBrowser not showing toolbar on ios6 with cordova 3.3.0

I work with Xcode 5, Cordova 3.3.0. The plugins has been installed by command line (cordova plugin add org.apache.cordova.inappbrowser).
I tested on Ipad2 with ios6 and on simulator with ios7.
I don't have any problem to open html file or pdf file but I don't have ToolBar/Location Bar or other.
It's impossible to close pdf to return on previous page !!!
What can I check again? What can I do to resolve this?
Thanks in advance for your help ;-)
Content of my html file:
<!DOCTYPE html>
<html>
<head>
<title>InAppBrowser.removeEventListener Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for device API libraries to load
//
document.addEventListener("deviceready", onDeviceReady, false);
// Global InAppBrowser reference
var iabRef = null;
function iabLoadStart(event) {
alert(event.type + ' - ' + event.url);
}
function iabLoadStop(event) {
alert(event.type + ' - ' + event.url);
}
function iabLoadError(event) {
alert(event.type + ' - ' + event.message);
}
function iabClose(event) {
alert(event.type);
iabRef.removeEventListener('loadstart', iabLoadStart);
iabRef.removeEventListener('loadstop', iabLoadStop);
iabRef.removeEventListener('loaderror', iabLoadError);
iabRef.removeEventListener('exit', iabClose);
}
// device APIs are available
//
function onDeviceReady() {
}
function openPdf() {
iabRef = window.open('test.pdf', '_blank', 'location=yes,toolbar=yes,transitionstyle=fliphorizontal');
iabRef.addEventListener('loadstart', iabLoadStart);
iabRef.addEventListener('loadstop', iabLoadStop);
iabRef.addEventListener('loaderror', iabLoadError);
iabRef.addEventListener('exit', iabClose);
}
function openHtml() {
// open win and turn off location
var ref = window.open('index2.html', '_blank', 'location=no');
// attach listener to loadstart
ref.addEventListener('loadstart', function(event) {
var urlSuccessPage = "index2.html";
if (event.url == urlSuccessPage) {
ref.close();
}
});
}
</script>
</head>
<body>
<p>PDF</p>
<p>page 2</p>
</body>
</html>
Content of my config file:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.antidot.testpdf2" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Hello Cordova</name>
<preference name="AllowInlineMediaPlayback" value="false" />
<preference name="BackupWebStorage" value="cloud" />
<preference name="DisallowOverscroll" value="false" />
<preference name="EnableViewportScale" value="false" />
<preference name="KeyboardDisplayRequiresUserAction" value="true" />
<preference name="MediaPlaybackRequiresUserAction" value="false" />
<preference name="SuppressesIncrementalRendering" value="false" />
<preference name="TopActivityIndicator" value="gray" />
<preference name="GapBetweenPages" value="0" />
<preference name="PageLength" value="0" />
<preference name="PaginationBreakingMode" value="page" />
<preference name="PaginationMode" value="unpaginated" />
<feature name="LocalStorage">
<param name="ios-package" value="CDVLocalStorage" />
</feature>
<name>test-pdf-2</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="dev#cordova.apache.org" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html" />
<access origin="*" />
<feature name="InAppBrowser">
<param name="ios-package" value="CDVInAppBrowser" />
</feature>
<feature name="File">
<param name="ios-package" value="CDVFile" />
</feature>
<feature name="Console">
<param name="ios-package" value="CDVLogger" />
</feature>
</widget>
most likely the inapp browser plugin is not loading, but rather a webview. Check all settings and see if the inappbrowser is actually being called.

Resources