Search Posts

Category: android

AngularJS – Bind to Scroll (Mousewheel, Dragging Bar, and Touch Swiping)

I made a very shabby “Infinite-Scroll” directive, all other solutions were incompatible with a md-grid-list so I went ahead and made my own alternative workaround. app.directive(‘scrollTrigger’, function($window) { return { link : function(scope, element, attrs) { var e = angular.element(element[0]); e.bind(‘mousewheel’, function() { var parent = e.offsetParent()[0]; if (parent.scrollTop + parent.offsetHeight > (70/100*parent.scrollHeight)) { scope.$apply(attrs.scrollTrigger); } }); } }; }); You simply put scroll-trigger on the html element that will be scrollable. The code checks […]

Facebook Plugin not working in ionic 1

I am developing an app from ionic-1. I also implemented facebook login plugin. I’ve followed this steps. I have no errors, but when I click on the facebook button, it doesn’t work, no errors displaying. I use alert in every error catch but no alert will be displayed. NOTE: I am running in an real android device because they said that native plugin will not work in browser. Please help me because Im working with […]

ios status bar and tab style is broken with ionic1 framework

I’m trying to deploy both Android and iOS with the ionic1 framework. I have finished development on Android basis and are now developing iOS. There are two problems. iOS should specify the upper status bar area separately (20px) A white background will appear on the top tab in all screens. Because of this, I need to paste the styles below into every view so it looks normal. <style> .platform-ios.platform-cordova:not(.fullscreen) .bar-header:not(.bar-subheader) { height: 84px; } .platform-ios.platform-cordova:not(.fullscreen) […]

Cannot Emulate Ionic v1 app to Android Emulator

I am developing an ionic app. And I want to emulate it on real android device. I already downloaded the Android Studio. I plugged my android device and When I tried to run this command ionic cordova run android There’s a lot of errors. Note: I am on windows 8.1 32bit. JDK 32 bit. Please help me. Im working on my thesis. This is the error Source: AngularJS

Why does Ionic Deploy add ionicCacheBuster to all of my files and calls?

I have an Ionic v1 app with ionic deploy. When my app starts up in the angular.run() block I have some code checking for a snapshot. $ionicDeploy.check().then(function (snapshotAvailable) { if (snapshotAvailable) { $ionicDeploy.download().then(function () { return $ionicDeploy.extract().then(function() { $ionicPopup.show({ title: ‘Update Available’, subTitle: ‘An update was just downloaded. Would you like to restart your app to use the latest features?’, buttons: [ { text: ‘Cancel’ }, { text: ‘Restart’, onTap: function(e) { $ionicDeploy.load(); //no code […]

$http requests not working in signed apk Ionic

when i run my cordova ionic app directly on android studio,it’s working and send $http request perfectly. but when i installed signed .apk,http requests doesn’t work Controller.js var postObject = new Object(); postObject.User = $scope.data.username; postObject.Secret = $scope.data.password; $http({ url: ‘https://example.com/’, method: “POST”, data: { ‘message’: postObject } }) .then(function(response) { $cordovaDialogs.alert(‘Success’, ‘Info’, ‘OK’); }, function(response) { $cordovaDialogs.alert(‘Error’, ‘Info’, ‘Error’); }); Config.xml <?xml version=’1.0′ encoding=’utf-8′?> <widget android-versionCode=”1″ id=”com.example.abc” version=”0.1″ xmlns=”http://www.w3.org/ns/widgets” xmlns:cdv=”http://cordova.apache.org/ns/1.0″> <name>Cordova project.</name> <description> Cordova […]