Menu
  • HOME
  • TAGS

Why am I still a product owner when I switched sandbox user using cordova-plugin-purchase for subscription payments?

Tag: cordova

I'm using cordova-plugin-purchase and I'm still a subscriber for the product after signing in with a different apple store account.

Best How To :

Turns out it was because cordova-plugin-purchase caches a bunch of things in localStorage such as owned status and receipts that were getting validated. Fixed with localStorage.clear(); and a reload.

Triggering function on an particular count in a for loop

javascript,jquery,cordova

Note: I don't know what this response property is in the object you're giving $.ajax; it's not in the standard options. But I assume you used it for a reason, perhaps some plugin. If not, change response to success in the below. You've said that e.length will be "unknown." I...

Not able to navigate to certain URL in cordova

android,cordova,whitelist

Sometimes, the default access settings aren't enough, i don't really know why, but i think i know how to patch this. Try to install this plugin : cordova plugin add https://github.com/apache/cordova-plugin-whitelist And then, in your config.xml, add this line <allow-navigation href="http://google.com/*" /> Compile again and tell me how it's going...

Unable to display SQLite data as listview using phonegap

javascript,html,sqlite,cordova

You made a mistake: you used result instead of res: tx.executeSql("SELECT (date) FROM time", [], function (tx, res) { var len = result.rows.length; // <- should be res if (len > 0) { for (var i = 0; i < len; i++) { var a = results.rows.item(i)['date']; // <- should...

Content-Security-Policy breaking console.log output

javascript,cordova,console.log,content-security-policy

Here an example of my settings in Content-Security-Policy. I don't have * in production, but then I have * replaced with all accepted locations. Also I needed to add gap://ready for the IOS platform. Not quite sure why this needed, but when I debugged on IOS I saw that it...

ember 2.0, Cordova and onDeviceReady

cordova,ember.js

You can get the application from within an initializer: Just use ember generate initializer cordova to generate a new initializer. This will generate a file named app/initializers/cordova.js. And then you can change it to listen the deviceready event like so: export function initialize(container, application) { application.deferReadiness(); document.addEventListener("deviceready", function() { application.advanceReadiness();...

SignalR working in browser not in app

cordova,signalr,ionic,hybrid-mobile-app

So I managed to make it work. Since I'm doing my cross-domain communication using JSONP i wanted to do the same with signalR. In my browser it worked properly but when compiled to APK and ran on device it didn't work. changing signalR to use CORS and not jsnop solved...

Cordova Andorid app update / versioncode

android,cordova

It's better to add that a in your config.xml file with android-versionCode="X" : <widget id="com.example.app" version="1.1.0" android-versionCode="2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> ...

How to run lastTask after forEach

javascript,angularjs,cordova,ionic-framework,promise

The problem is that you are not pushing promises into your promise array. You are (eventually) pushing normal values into the array, but not before you've run a $q.all on an empty or near-empty array. $scope.upload = function() { var token = window.localStorage.getItem('yourTokenKey'); var promises = []; var options =...

$scope does not getting called in view

angularjs,cordova,ionic-framework

See this blogpost how to use resume using Angular and Ionic , http://tripleneo.nl/resume-app-using-angularjs-ionic/ .run(function ($ionicPlatform, $state, $timeout) { $ionicPlatform.ready(function () { document.addEventListener("deviceReady", function () { document.addEventListener("resume", function () { $timeout(function () { navigator.notification.confirm( "\nYou are still tracking an activity. Do you want to view it?", function () {}, "Information", ["YES",...

How to show icons in $cordovaActionSheet plugin buttonLabels in ionic framework?

angularjs,cordova,ionic-framework,cordova-plugins

I see you have tagged ionic-framework as well. If you are using Ionic you can make use of $ionicActionSheet instead of the $cordovaActionSheet. See this doc. With the $ionicActionSheet it is no problem adding images: angular.module('mySuperApp', ['ionic']) .controller(function($scope, $ionicActionSheet, $timeout) { // Triggered on a button click, or some other...

How to change Cordova application icon?

cordova

The answer may vary based on your version of Cordova, but as of Cordova 3.5.0, this is the way of adding icons to your project. As mentioned in my comment, see the official docs for the source. First create a folder for your icons to live. This will vary depending...

How to refresh iframe url?

angularjs,cordova,ionic-framework,ionic

The thing you are doing in your code is not a valid way of doing it. You are manipulating DOM using native method that will not run digest cycle, you need to run it manually by doing $scope.$apply(). That will solve your problem but generally you should not do DOM...

Cordova FileTransfer not sending custom headers

javascript,php,cordova,file-transfer

Php doesn't show headers posted via Cordova FileTransfert. I think that header sent is protected. The header can be captured in PHP via this portion of code : $this->header = getallheaders(); $this->uid = (isset($this->header['uid']) && !empty($this->header['uid'])?$this->header['uid']:null); echo $this->uid; //return the User Id sent via Post request from Cordova FileTransfert. Hope...

Cordova verify app is asleep when not active

cordova,ionic-framework

Most likely the issue is the navigator.geolocation.watchPosition. You will want to make use of the device events to handle stopping and starting this when the app is paused and resumed. Here is a quick sudo example: Define a global for your watcher var watcher; Add listeners for pause and resume:...

Cordova Inappbrowser - window.history.back and forward won't work inside executescript function

javascript,jquery,cordova,inappbrowser

Never mind. I got used to how I did my other buttons where i had to use functions from cordova plugins. That is why i put in in a callback of an executescript within the callback of another execute script which calls a file: 'externaljavascriptfile.js' I just realized, I didn't...

jquery mobile all the data attribute references does not work

jquery,html,css,cordova,jquery-mobile

In reference to your fiddle-link (https://jsfiddle.net/f0eurafv/1/): The problem is that you have bound a click-function to your <h2>-tags in which you manually fadeIn/fadeOut your different pages. In this case jQuery-mobile will not do the work for you (switching to the other page) and as a side effect it will not...

Cordova build fails, can't find ${appt}

android,cordova,ant

It looks like ant commands are broken in Android SDK 24.3, which cordova build is using. I downgraded to previous release (24.2.0) and ant works fine now. You can download previous SDK from: http://dl-ssl.google.com/android/repository/tools_r24.2-windows.zip...

__createApplicationIconFromImage_block_invoke: Error: unable to create icon mask image from image named “AppIconMask.png” at scale 2.0

ios,objective-c,cordova,phonegap-plugins

This solved me issue. It is working fine now after following below steps https://discussions.apple.com/thread/6742087?start=0&tstart=0 To troubleshoot this issue where your iPhone is unresponsive, please follow the steps outlined below: 1. If a single application is not responding or stops responding when it opens, you can force it to close. 2....

Different performance with Intel XDK

cordova,jquery-mobile,phonegap-build,intel-xdk

Most likely you build the app with the usual Android build, while the App Preview uses the Crosswalk Android build for the preview, which is much faster for Android < 4.3. Build your app with 'Crosswalk for Android', you'll get the same performance. :)...

How to Upgrade Cordova 3.5.0-0.2.4 to any higher version?

android,cordova,cross-platform,phonegap-plugins,cordova-3

My guess is that sudo is hosing you up here. Running sudo cordova -v should spit out that version you installed. I try to avoid using sudo to install npm modules. This answer here has a lot of solid solutions in it: NPM throws error without sudo There are some...

Cordova Keychain Plugin and SSKeychain Plugin do not work together

ios,cordova,cordova-plugins,keychain

I had the same problem. My solution was to change the plugin in Cordova by com.crypho.plugins.securestorage (http://plugins.cordova.io/#/package/com.crypho.plugins.securestorage). The problem is that SSKeychain plugin has a keychain access group different to Cordova Keychain Plugin, so between apps that use the same plugin work good, but when the plugins are different doesn't...

Bluetooth LE app, how to build it cross-plaftorm (iOS-Android)?

android,ios,cordova,bluetooth,bluetooth-lowenergy

I have been using Randdusing's Cordova plugin for BluetoothLE and it works well for Android and iOS (Windows phone still under development). Being Cordova it's designed to work with an HTML5/JavaScript app, but the plugins themselves (as all Cordova plugins?) are written in native code . Earlier in my project...

Phonegap: Command failed with exit code 8

android,cordova,gradle

I have already managed to solve this problem, so, in case of anyone has a similar trouble, here it goes the situation I've gone through. When I performed the first build, phonegap attempted to download and extract it's own gradle distribution, and he was attempting to download it from the...

cordova ionic barcode scanner error

cordova,ionic-framework,barcode-scanner

If you are using the iOS Simulator you can't test this plugin because the simulator does not support the camera. So you need to use a real device to test you app. Check the documentation: Testing and Debugging in iOS Simulator UPDATE Your code seems to have some errors. Try...

Best option for converting a JSP website to Android app?

android,cordova,webkit,native,hybrid-mobile-app

It would be a lot easier (as well as interesting) to write simple mobile clients in native Java/Objective-C for Android & iOS. For an experienced web developer, it would not be hard to create simple apps using articles on Google/StackOverflow. Not to mention that using the native mobile SDKs' is...

No plugins are working in Cordova

javascript,cordova

I made a sample app with your configuration and had the same issue, but I found out that you were missing something (comparing to a cordova app of mine). HTML - add onload attribute on body tag: <body onload="onLoad()"> ..and in your index.js file - wrap deviceready listener inside onLoad...

Cordova cordova.plugins is undefined on win8 but not on iOS

javascript,cordova,cordova-plugins,visual-studio-cordova

For Cordova Windows8 applications (or all applications built with Visual Studio), if your plugin is a custom one (I would assume it's not part of the org.apache...), you have to manually add it. Go to the config file in your www through visual studio. You will see three tabs: Core/Custom/Installed....

html query string with blackberry

javascript,html5,cordova

yes it does work, I tried with a bb device (on the same network) using 2 html pages in my localhost.

How to request new banner ad in AdMob Pro?

angularjs,cordova,admob,ionic,cordova-plugins

Set the refresh interval in your AdMob portal. By default the interval is 60 seconds, but you can configure it as you wish....

How to copy a photo from gallery to dataDirectory?

javascript,cordova,plugins,ionic-framework

Here is how you should handle it (with fileTransfer plugin instead of file one) : app.controller( 'MainController', [ '$scope', '$cordovaCamera', '$cordovaFileTransfer', function($scope, $cordovaCamera, $cordovaFileTransfer) { $scope.images = { imageUri: '' }; $scope.getImage = function() { var options = { quality: 50, destinationType: Camera.DestinationType.FILE_URI, sourceType: Camera.PictureSourceType.PHOTOLIBRARY, saveToPhotoAlbum: false }; $cordovaCamera.getPicture(options).then( function(fileUri)...

How to use Azure Mobile Service with Cordova Project AngularJS and C#?

c#,angularjs,cordova,sql-azure,azure-mobile-services

This tutorial shows how to work with the PhoneGap version of Cordova against a JavaScript backend Mobile Service: https://azure.microsoft.com/en-us/documentation/articles/mobile-services-javascript-backend-phonegap-get-started/ Here's one for regular Cordova: http://blogs.msdn.com/b/writingdata_services/archive/2015/01/26/azure-mobile-services-quickstart-for-visual-studio-cordova.aspx You do not have to use C# - Mobile Services offers a Node.JS backend as well. Both provide a table abstraction that is covered in...

how to handle the application on outgoing and incoming calls in ios phone phonegap programming?

javascript,ios,objective-c,cordova,phonegap-plugins

Adding core telephony framework and its delegate methods solved my requirement. //Initialize the plugin - (void)pluginInitialize { self.callCenter = [[CTCallCenter alloc] init]; [self handleCall]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callReceived:) name:CTCallStateIncoming object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(callEnded:) name:CTCallStateDisconnected object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self...

error “The connection to the server was unsuccessful. (file:///android_asset/www/index.html)” in codovar and jqury

android,jquery,cordova,jquery-mobile

I recommend first, to check your config.xml there is a section where you can specify the start page of your app. It must be ponting to "index.html" and I think your page is called "Login.html" (Just a guess) The section looks like this <content src="your_page.html" /> just change that section...

Cordova geolocation watchPosition sensitivity

cordova,geolocation,phonegap-plugins,ionic,cordova-plugins

The success callback passed into watchPosition() is called each time the operating system receives a location update, which is not after a specific interval of time. For instance, if using high accuracy, it will be called each time the GPS hardware passes a position update to the OS. Therefore this...

How to download a library dependence on gradle for external use?

cordova,android-studio,gradle,android-gradle,cordova-plugins

What you're looking for is an aar file. You can copy this file to lib folder with the following script: apply plugin: 'java' repositories { mavenCentral() } dependencies { compile 'io.filepicker:filepicker-android:[email protected]' } task copyLibs(type: Copy) { from configurations.compile into 'lib' } ...

jquery mobile change icon project android cordova

android,html5,cordova,icons

As far as i know you will find the icons in the res folder Below are the folders that each has an icon for different sized screens. You need to keep the same name (ic_launcher) and the same size so simply replace the icon with your App icon in each...

Programmatically enable GPS of device when application opens in cordova

angularjs,cordova,ionic,cordova-plugins

You could check the error code in PositionError parameter of geolocationError in your call to getCurrentPosition. I am guessing that it will be PositionError.PERMISSION_DENIED when gps is not enabled, and PositionError.POSITION_UNAVAILABLE or PositionError.TIMEOUT when gps is enabled but there are other issues. Note that this is platform dependent. You would...

Cordova- embed a external website into cordova app

cordova,browser,web-applications,website

Since You have already created cordova app, you need to add Inappbrowser plugin to app so you can open your website in it. [Add other necessary plugins] To add Inappbrowser plugin use following command. cordova plugin add org.apache.cordova.inappbrowser Add following line to index.js to open your website link. var url...

Cordova plugin error: Resource interpreted as Script but transferred with MIME type text/plain

javascript,cordova,ionic-framework,cordova-plugins

I believe those are not 'real' errors and Chrome specific: see this SO answer

Cordova compiling fails with admob - missing com.google.android.gms:play-services-ads:+

android,cordova,admob

Please install the extra items as following: ...

Page reloads even after button click

javascript,jquery,html,cordova

You are calling the init() method from start.html which onload calls function onDeviceReady() which has a location change,hence other page loads. You need to add the document.getElementById('submitButton').addEventListener("click", startApp,false); when loginPage.html (maybe in a different function) page loads not when the start.html loads. Hope it helps....

Ionic - 'platform add android' Comand failed with exit code ENOENT

java,android,cordova,environment-variables,ionic

Sorry don't have enough privilege to comment on your question. I had faced similar issue. run this command before adding android platform, C:\your\Directory>npm link cordova C:\your\Directory>npm link ionic then go for, C:\your\Directory>ionic platform add android hope this helps!...

Why does WebSQL not work with iOS applications made with PhoneGap?

javascript,jquery,ios,cordova

It's probably not working on iOS because you're requesting a database size which far exceeds the allowed limit: 1000 * 1024 * 1024 == 1Gb The established upper limit for a WebSQL DB in an iOS WebView is 50Mb (see here]. It may work on other platforms either because they...

New font for iOS 9 will be applied on Ionic apps?

ios,cordova,fonts,ionic

The best answer for iOS web developers would be that it would be included by default at release and could be called via font-family. As of iOS 9 Beta 1, I could not get to the San Francisco font in this way. font-family: 'San Francisco Display', "Helvetica-Neue", Helvetica, sans-serif; -OR-...

Creating an Android app using PHP

php,android,database,cordova

Cordova is mainly a JavaScript framework that exposes native device features as JavaScript functions. Think of a cordova application like a plain HTML & Javascript website running in a Webview within your mobile application. The PHP interpreter isn't available on a mobile device, which is why you cannot package PHP...

Adding dymatic data into phonegap plugin

javascript,android,jquery,cordova,phonegap-plugins

I don't think you need the quotes: <a href="#" onclick="window.plugins.socialsharing.share( null, null, document.getElementById('setquote').innerHTML, <- remove quotes here null )"> When you wrap that line in quotes, you're just passing a string, I think you want to pass the actual inner html...

How to get the device's uuid and model information in ionic based App?

cordova,ionic-framework,ionic

I was suffering with the same problem. I got what you need after long search->try->implement->erase->new try cycle. Though i followed ng-cordova plugins, i came to know that adding ng-cordova.js will not make it easy to resolve the plugin problem bcoz it just contain the initialization of plugins that are supported...

Cordova Plugin to ask for Ratings

cordova,phonegap-plugins,cordova-plugins,rating

you can check these link out... https://github.com/pushandplay/cordova-plugin-apprate (this one is easy to set up) http://www.joshuawinn.com/adding-rate-button-to-cordova-based-mobile-app-android-ios-etc/ (haven't used this but heard good reviews abt it) Hope it helps.!...

Image Map Area Highlight and Zooming with iScroll 4

javascript,cordova,iscroll,imagemapster

I got figured it out. For someone like me, here is my solution. I used imagemapster.js for highlighting map areas. But I applied imagemapster first and then I grab those whole element and then applied iScroll(version 4) for zooming. First, i was doing backward, that's why I can't zoom in...

fabric.js resize canvas to fit screen

javascript,android,cordova,canvas,fabricjs

1. Use css to set your right resolution for canvas: var canvas = document.getElementById("canvas"), ctx = canvas.getContext("2d"); canvas.width = 800; canvas.height = 600; css: /* media query 1 */ #canvas{ width: 400px; height: 250px; } /* media query 2 */ #canvas{ width: 200px; height: 120px; } pros: All the resolution...