About the cordova category

Any Cordova questions in your Ionic app? Feel free to post them here.

1 Like

Hi,
I’m currently working on functionality to get contacts from gmail, using #cordova. Any help will be appreciated. Thank you.

I have used social share plugin to share image to Facebook.It working fine in Android and below versions of ios 9, in iphone(6s) ios 9, It it not sharing image to Facebook showing empty post facebook popup.Any one can please reply back soon to resolve this issue.

HI i am developing one application with ionic i get the data from the service i=and i display the data to the user .user can share the data via email as well as facebook.when user share via email the content from service should share as a pdf.so i created pdf and i used ngcordova file i attach created file to the email it works great in android but in ios the attachment is missing i gave document path to store the pdf

How to disable tab programatically in ionic2?

I want to use google map directions service in my ionic app. but ngCordova Geolocation only provide google map and display map in ionic app. please help if you have any idea

Map directions… I’m in the same boat. It seems me that Ionic doesn’t accept map directions… :unamused:

cannot find proper doc and example for $cordovaContacts

hi @TomCosta i find something useful:
google map direction javascript api

in that scroll down in Demos and sample code click directions tab
you will see direction code
`initmap(){

}`

paste it on your code and its working. :grinning:

1 Like

H everybody , i am a beginner on hybrid aps and i use ionic framework . I want to stream audio from my firebase console to my application . i have always uploaded the database including the URL for every audio but in all tutorial i have seen , they just play one song but me i want to play a whole playlist from the firebase storage . this is the part of my code where i display the playlist

  • {{song.songName}} {{song.artistName}}
Please help me , I am stuck at this point for days now ...

Hi everybody,

I have been trying to make my app work for days. I can only debug in the browser, and there everything looks great and is working properly. I think is related to $cordovaSQLite and pass of the variables. I will much appreciate if you could help me.

Thanks in advance!

app.js:

angular.module(‘starter’, [‘ionic’, ‘starter.controllers’, ‘ngCordova’, ‘ngAnimate’])

    .run(function ($ionicPlatform, $cordovaSQLite) {

$ionicPlatform.ready(function () {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);

            }
            if (window.StatusBar) {
                // org.apache.cordova.statusbar required
                StatusBar.styleDefault();
            }
        });
    })

controllers.js:

angular.module(‘starter.controllers’, [])

    .controller('AppCtrl', function ($scope, $ionicModal, $timeout, $cordovaSQLite) {

        // With the new view caching in Ionic, Controllers are only called
        // when they are recreated or on app start, instead of every page change.
        // To listen for when this page is active (for example, to refresh data),
        // listen for the $ionicView.enter event:
        //$scope.$on('$ionicView.enter', function(e) {
        //});

        // Form data for the login modal
        $scope.loginData = {};

        // Create the login modal that we will use later
        $ionicModal.fromTemplateUrl('templates/login.html', {
            scope: $scope
        }).then(function (modal) {
            $scope.modal = modal;
        });

        // Triggered in the login modal to close it
        $scope.closeLogin = function () {
            $scope.modal.hide();
        };

        // Open the login modal
        $scope.login = function () {
            $scope.modal.show();
        };

        // Perform the login action when the user submits the login form
        $scope.doLogin = function () {
            console.log('Doing login', $scope.loginData);

            // Simulate a login delay. Remove this and replace with your login
            // code if using a login system
            $timeout(function () {
                $scope.closeLogin();
            }, 1000);
        };
    })

    .controller('LibuCtrl', function ($scope, $ionicPlatform, $cordovaSQLite) {
        $ionicPlatform.ready(function () {
            if (window.cordova) {
                var db = $cordovaSQLite.openDB({name: "kant2.db", iosDatabaseLocation: 'default'});
            } else {
                var db = window.openDatabase("kant2.db", '1', 'kant2', 1024 * 1024 * 100); // browser
            }

            $scope.libu = [];

            var query = "SELECT * FROM libu ORDER BY ordena ASC";
            $cordovaSQLite.execute(db, query).then(function (result) {
                if (result.rows.length > 0) {
                    for (var i = 0; i < result.rows.length; i++) {
                        $scope.libu.push(
                                {
                                    iz: result.rows.item(i).libuize,
                                    id: result.rows.item(i).libuid
                                }
                        )
                    }
                }
            }, function (err) {
                console.error(err);
            });
        });
    })
    })
    ;