Search Posts

Category: cordova-plugins

Ionic,OneSignal-Open the launchURL with in the app

I am sending a URL has parameter along with push notification.when clicked on notification,the link gets opened inside the mobile browser.I want the link to be opened within the mobile application.For that i used the following code in ionicPlatform ready as stated in documentation, window.plugins.OneSignal .startInit(“APP_ID”) .handleNotificationOpened(function(jsonData) { alert(“Notification opened:n” + JSON.stringify(jsonData)); console.log(‘didOpenRemoteNotificationCallBack: ‘ + JSON.stringify(jsonData)); }) .endInit(); Then in the console,it displays an error as window.plugins.OneSignal.startInit is not a function. can someone help me […]

Preload image cache issue in Ionic v1 app

I did android & iPhone app using ionic 1, angular 1. Services stored on AWS t2 large server. On the some app screens I am showing images which is coming from server. I have compressed those images & it’s size 20-50kb still images taking too much time to load on device, so I have used imageCacheFactory for preload images & storing into cashe, plugins working on Android device but didn’t supporting to iPhone. Following are […]

How to use iBeacon in an Ionic1 app?

I am writing an app that will detect the beacons around it when bluetooth is on. It’s with Ionic v 1.3.5, cordova cli v 8 and AngularJS 1.5.3. I have been trying to use this plugin: I also tried to follow this tutorial: I got the plugin running but it does not detect any iBeacons even when they are sitting on my desk! I tried this Android app ibeacon detector and it found […]

How to convert pdf file into base64 encoded string in ionic 1?

The mobile application is developed with ionic 1 which uses angularJs. The existing application generates pdf files for selected images but what is needed is to add images to existing pdf file. Images are converted to base64 string and generated pdf with JSPDF. Select images from local storage $scope.addImages = function (options) { var options = { quality: 10, destinationType: Camera.DestinationType.FILE_URI, sourceType: Camera.PictureSourceType.PHOTOLIBRARY, allowEdit: true, encodingType: Camera.EncodingType.JPEG, targetWidth: 1024, targetHeight: 768, popoverOptions: CameraPopoverOptions }; $cordovaCamera.getPicture(options).then(function(imageData) […]

How to add multiple different images in one pdf using jsPdf?

Here is given my sample code. It allows to add only one image to the pdf. My requirement is to add different images to one pdf. Is there any method to solve this problem. I have used encode variable to access my encoded image with Base64. Please do help me. Thanks $scope.pdfFilename = “test.pdf”; $scope.makePDF = function(){ var doc = new jsPDF(); alert(“sfgsfg”); var imgData = encode; alert(imgData); doc.setFontSize(40); doc.text(35, 25, “Octonyan loves jsPDF”); doc.addImage(imgData, […]

Google GeoCoding API – returns ZERO_RESULTS but the location converts to latitude longitude

I am using Google GeoCode API to search a location from an address and get LAT, LON information of that location. From the API I get ZERO_RESULTS sometimes whereas if I search the address from the google maps, it converts the latitude longitude The address I search for is, Gariahut Corporation Market, Gariahut, Kolkata, Kolkata, West Bengal, India, 700019 Below given is the request that I sent to Google API, Can anyone help me […]

ionic 3 read stored value native storage in function ionViewDidLoad ()

I’m having a problem, I’d like to read a value saved in the Native Storage Cordova plugin in the function -> ionViewDidLoad (). Description of the function: ionViewDidLoad () = “Runs when the page has loaded. This event only happens once per page being created. If a page leaves but is cached, then this event will not fire again on a subsequent viewing. The ionViewDidLoad event is good place to put your setup code for […]

Cordova build hook doesnt display version information

I am using cordova build.js file from this link as explained have added buildversion.js file in hooks directory in visual studio and changed this line to var wwwFileToReplace = “js/app.js” in my angular module with constant as .constant(‘BUILD’, { VERSION: “%%VERSION%%” // %%VERSION%% will be replaced with the actual version from config.xml }) but still its not returning version information from config instead it just display this %%version%% any idea ? Also have referenced […]