ionic-framework

convert audio file to base64 in ionic 3

自古美人都是妖i 提交于 2020-01-16 18:03:27
问题 I am trying to save an audio and send it to the server in ionic 3. record(){ if (this.platform.is('ios')) { this.fileName = 'record'+new Date().getDate()+new Date().getMonth()+new Date().getFullYear()+new Date().getHours()+new Date().getMinutes()+new Date().getSeconds()+'.3gp'; this.filePath = this.file.documentsDirectory.replace(/file:\/\//g, '') + this.fileName; this.audio = this.media.create(this.filePath); } else if (this.platform.is('android')) { this.fileName = 'record'+new Date()

IONIC 3 - Open app on notification received

无人久伴 提交于 2020-01-16 17:08:12
问题 My app's notification is working fine, receiving notifications on background and foreground, using firebase-native plugin .Now, my client needs the app open when the notification is received without any user iteration. I've found was this, but has no correct answer for me. On my debug, I've realize that the notification is received via broadcast by FirebaseInstanceIdReceiver. So, I've tried: Modify the plugins/cordova-plugin-firebase-lib/plugin.xml This compile but nothing happens. Modify the

Angular 2 Ionic Form

前提是你 提交于 2020-01-16 16:14:12
问题 I'm trying to submit a form in angular using ionic <form method="post" class="form-horizontal" action="https://localhost:44370/Account/ExternalLogin"> <div> <p> <!-- ion-button block [disabled]="isDisabled" --> <button name="provider" value="Coinbase" type="submit" title="Log in using your Coinbase account"> Coinbase </button> </p> </div> </form> However, when I click the submit button nothing occurs. 回答1: Use the ngForm (template or reactive way) provided by angular. Also for you button

Get firebase database of current uid returns undefined

▼魔方 西西 提交于 2020-01-16 09:39:28
问题 I have a page to a retrieve user's information, but I am getting undefined. Below is my data structure { "posts" : { "-L4QKxs6d06Vq3amQ7C8" : { "content" : "Test", "owner" : "D5hkgRIN87OUr3rdSGK1Znws1aB2", "title" : "Admin Post" }, "-L4UDg1_glHcqwGjGpTQ" : { "content" : "fsdfd", "owner" : "D5hkgRIN87OUr3rdSGK1Znws1aB2", "title" : "rewsrwr" } }, "users" : { "D5hkgRIN87OUr3rdSGK1Znws1aB2" : { "posts" : { "-L4QKxs6d06Vq3amQ7C8" : { "title" : "Admin post" }, "-L4UDg1_glHcqwGjGpTQ" : { "title" :

iOs orientation widht and height are smaller than it sould be

自古美人都是妖i 提交于 2020-01-16 07:42:23
问题 I have an issue running my ionic application on iOs real devices (tested on iPhone 4 and iPad 4th generation). All is woking perfectly on android phones, tablets ans iOs emulators. (This is the orientation plugin I am using: cordova-plugin-screen-orientation) My app is locked in the portrait mode and by clicking on a button I pass to another page which locks the landscape orientation. (All is going well till now) When I click the back button to return to the portrait oriented page, it rotates

Eager load an ionic Toast Controller

耗尽温柔 提交于 2020-01-16 06:09:24
问题 I have this function that listen the internet connection private verifyNetworkConnection() { this.networkService .isNetworkConnected .pipe(distinctUntilChanged()) .subscribe(connected => { if (connected) { // do secret things } else { this.toast.create({ message: 'Sem conexão a internet', showCloseButton: true, duration: 2000, cssClass: ToastClasses.ERROR }).then((res) => res.present()); this.disconnectFromServices(); } }); } And in the else block, i need to show a Toast that says the user

How to get Google Advertisement ID in Ionic3?

≡放荡痞女 提交于 2020-01-16 05:33:25
问题 Hi we tried to get Advertisement ID using ionic3 application.We added plugin cordova plugin add cordova-plugin-idfa --save We tried like this ONE: cordova.plugins.idfa.getInfo().then(function(info) { if (!info.limitAdTracking) { console.log('OK getting ID**********'+info.idfa || info.aaid); } }); we are getting get Cannot read property 'getInfo' of undefined TWO: declare var androidIDFA; @Component({ templateUrl: 'app.html', }) export class MyApp { googleAddId:any; if (this.platform.is(

Conditional ng-include together with ng-controller in AngularJS

早过忘川 提交于 2020-01-16 05:13:09
问题 I have a conditional ng-include directive with a ng-controller associated, but it seems the controller isn't run when the condition is true. The target is to include the template only when the condition is met and avoid the TypeError: Cannot call method 'insertBefore' of null issue. For example: <div ng-include src="myContent.imgList ? 'ui/image-list.html' : null" ng-controller="ImgListSubCtrl"> </div> When myContent.imgList is filled with data, I expect the image-list.html template to be

ionic cordova android build error (cordova.cmd build android exited with exit code 1)

佐手、 提交于 2020-01-16 01:48:04
问题 I'm trying to deploy an android build for the app. But below error occurs in the process. May be the issue is in gradle. But "gradle -v" command executes on cmd successfully and views gradle version. But I separately downloaded gradle files and set path variables to use gradle. ANDROID_SDK_ROOT=undefined (recommended setting) ANDROID_HOME=C:\Users\intern\AppData\Local\Android\Sdk\ (DEPRECATED) Subproject Path: CordovaLib Subproject Path: app Exception in thread "main" java.lang

Ionic iOS remove default splash screen

做~自己de王妃 提交于 2020-01-16 01:08:30
问题 I tried this BUT didn't work <preference name="SplashScreen" value="none"/> After this I also tried ionic platform remove ios ionic platform add ios ionic emulate ios But it didn't work Other details: vishal$ ionic -version 1.7.10 vishal$ cordova -version 5.4.0 vishal$ npm -version 2.14.7 config.xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <widget id="com.ionicframework.splashscreenapp489828" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache