@tonpongsakorn wrote:
My ionic info
When use ctrl+c ionic run on background.
Posts: 4
Participants: 4
@tonpongsakorn wrote:
My ionic info
When use ctrl+c ionic run on background.
Posts: 4
Participants: 4
@uddyvky wrote:
Hey, guys, I was thinking about adding input field with a plus button click on form i.e user presses the ‘+’ button and an input field appears (the user can have any no. of input fields).
Can anyone please suggest me how to do it??
Posts: 1
Participants: 1
@srinivasprabhu wrote:
Tech: Ionic, Android 8.1
Problem background
We want to open our custom .bcem file, downloaded from Chrome browser, on Android 8 (not version 6.x). Open “Download” menu in Android 8.x Chrome and click on a .bcem file.
The extension .bcem is registered with our app and should open the .bcem file in the app.
To access file content, we need access to its file path on disk. When we open file on Firefox or any other browser, the ionic plugin filepath.resolveNativePath(intent.data) is able to give us the filepath from intent.data. People familiar with Ionic and filepath plugin should be able to recognize this.
Problem
Opening a .bcem file from Download folder in Android 8.x Chrome gives the following intent
intent.action: “android.intent.action.VIEW”
intent.data = “content://com.android.chrome.FileProvider/downloads/demo.bcem”Then subsequent calls to ionic’s fileplugin.resolveNativePath( intent.data ) fails to give access to file on disk.
What could be the issue?
Posts: 1
Participants: 1
@estacho999 wrote:
Senhores bom dia, peço desculpas já pela minha ignorância, porém essa é a minha primeira aplicação utilizando firebase, e estou meio confuso em relação a algumas coisas.
Eu estou construindo um aplicativo de cartão ponto, que este será utilizando por N clientes, onde cada cliente irá cadastrar a sua empresa, seus funcionários e manipular exclusivamente informações de sua empresa dentro do aplicativo. Porém isso me causa algumas dúvidas, que acredito que sejam simples de serem esclarecidas :
Como eu farei a distribuição deste aplicativo ? Eu terei que criar uma integração com firebase a cada cliente que eu vender o aplicativo ? Ou eu posso me utilizar do mesmo banco de dados e hospedar todos os meus clientes neste mesmo banco já criado ? Como vocês lidam com casos assim ?
Outra dúvida é, caso eu vá usar o mesmo banco de dados para todos os clientes, é necessário que eu faça uma sessão de usuário por empresa ? Por exemplo, o usuário João escolherá a empresa dele, e ao logar o sistema valida se o João pertence a aquela empresa e então direciona ele apenas para a empresa dele dentro do aplicativo ? Eu acredito que isso seja tratado nos nós do firebase, alguém pode me dar uma ajuda nessa parte ?
Posts: 1
Participants: 1
@Priyanka4010 wrote:
i am using ionic 2 application and want to make build for iOS , i am getting some errors like:
bash-3.2# cordova build ios [xmldom error] invalid doc source @#[line:0,col:undefined] (node:10217) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'documentElement' of undefined
i am getting so much confused that how to resolve this. please help me out of this asap, this is very urgent for me now, please reply immediately.thanks in advance.
regards,
priyanka sharma
Posts: 2
Participants: 2
@Pisix wrote:
Hello, I’m migrating an ionic 3 app to ionic 4, and I notice that some Api Platform function no longer exist and nothing about the break is mentioned in CHANGELOG or BREAKINGLOG.
What is the alternative of below functions on new ionic version ?
this.platform.exitApp(); this.platform.registerBackButton(); ...
Ionic info:
Ionic: ionic (Ionic CLI) : 4.0.1 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.0.0-beta.0 @angular-devkit/core : 0.7.0-rc.3 @angular-devkit/schematics : 0.7.0-rc.3 @angular/cli : 6.0.8 @ionic/ng-toolkit : 1.0.0 @ionic/schematics-angular : 1.0.0 Cordova: cordova (Cordova CLI) : 8.0.0 Cordova Platforms : none System: Android SDK Tools : 26.1.1 ios-deploy : 1.9.2 NodeJS : v8.9.4 (/usr/local/bin/node) npm : 6.2.0 OS : macOS High Sierra Xcode : Xcode 9.4.1 Build version 9F2000 Environment: ANDROID_HOME : /Users/pisix/Library/Android/sdk
Posts: 1
Participants: 1
@lado wrote:
Hello,
I’m trying to get badges over the app icon with push notification receiving:
in
app.components.ts
I usethis.increaseBadges(this.badgeNumber);
ininitPushNotification()
from constructorplatform.ready().then(() => { this.initPushNotification(); })
with previouslet permission = await this.badge.requestPermission();
function to get permission value true:... const pushObject: PushObject = this.push.init(options); pushObject.on('notification').subscribe((notification: any) => { if (notification.additionalData.foreground || notification.additionalData.background) { console.log('Received a notification', notification); this.increaseBadges(this.badgeNumber); ...
which is
badgeNumber: number;
variable, it works for foreground, but I’m not sure if it is proper way to use this variable in background to increase or decrease badge:async increaseBadges(badgeNumber: number) { try { let badge = await this.badge.increase(badgeNumber); console.log("Badge notification counter: ", badge); this.badgeNumber = badge; var badgeAmount = badge; this.setBadges(badgeAmount); } catch (e) { console.log(e); } } async setBadges(badgeAmount: number) { try { let badges = await this.badge.set(badgeAmount); console.log("Set badges: ", badges); this.out = badges; this.getBadges() } catch (e) { console.log(e); } } async getBadges() { try { let badgeAmount = await this.badge.get(); console.log("Get badges amount: ", badgeAmount); this.out = badgeAmount; } catch (e) { console.log(e); } }
badgeAmount
value increases with receiving of push notification in foreground from device debug console, but badge does not appears on icon. For example, increasing badge manually with button, shows counter circle on icon. Seems like I’m doing something completely wrong way. I’m not sure, how to get badges counter forIonic2
Type Script
Android
application icon, with receiving push notification in background and foreground.I’ve tried to use background plugin
import { BackgroundMode } from '@ionic-native/background-mode';
to increase in background, but this way application freezes on loading. I’m not sure if I’m using background correctly, and if this solves badge problem in result:background(){ this.backgroundMode.on('activate').subscribe(() => { console.log('activated'); this.increaseBadges(this.badgeNumber); }); this.backgroundMode.enable(); }
Posts: 1
Participants: 1
@shepard wrote:
Comparing the Ionic conference app:
To the Ionic Stencil Conference app:
It looks like all pages are classed as Components.
While this may be a personal option (to use component or page), is this the growing trend and should we be following this for the sake of continuity?On the same note, using Services or Providers as the container name. If they are essentially the same thing except for how you inject them, should we name all services - Providers?
Posts: 1
Participants: 1
@dtarvin wrote:
Hi all. I’m trying to change a search bar box to a line. The code has an input field with a bottom border, but I’m trying to create a search bar dropdown. However, instead of a search ‘box’, I am hoping I can do it with just a line like the input field had. Here is the relevant portion of the code:
<ion-content padding> <ion-navbar> </ion-navbar> <ion-card style="padding: 24px;"> <ion-card-content> <ion-grid> <ion-row> <ion-item col-2 style="width:150px; border-bottom: 1px solid #f4f4f4"> <ion-label floating>keyword(s)</ion-label> <ion-input type="text"></ion-input> <!-- <ion-searchbar no-border (ionInput)="getItems($event)"></ion-searchbar> <ion-list> <ion-item *ngFor="let item of items"> {{ item }} </ion-item> </ion-list> --> </ion-item> </ion-row> ... </ion-grid> </ion-card-content> </ion-card> </ion-content>
The commented out code is what I’m adding for the search bar. Without that code, the input field functions as an input field should. When the code is added, the input field still functions as normal. The search bar and the dropdown list don’t appear or run. When I comment out the input line, the floating label becomes static and the input line doesn’t work, and the search bar and dropdown still don’t appear. However, if I comment out both the label line and the input line, the search bar and dropdown list appear and the search bar filter works, so I know that my code for the search bar (and its data) is correct. I’ve tried adding a z-index to the search bar, but that didn’t work.
So, does anyone have any idea of how to do what I want to do?
Thanks!
Posts: 1
Participants: 1
@Fahadionic wrote:
Hi,
I am using popover to display different option for user to select , after selecting or inputting different values user clicks on search button on popover. see the screen dump below :
on search button i have event :close() { let data = { dStart : this.dStart, dEnd : this.dEnd, searchText: this.searchText, supplier : this.supplier, barcode: this.barcode }; this.viewCtrl.dismiss(data); }
In the parent component I am presenting this popover using the code below :
presentSearchPopover(ev){ let popover = this.popoverCtrl.create(PopoverSearchPage,{}); popover.present({ ev: ev }); popover.onDidDismiss(data => { console.log(data); if(data!=null){ this.dStart = data.dStart; this.dEnd = data.dEnd; this.supplier = data.supplier; this.barcode = data.barcode; this.searchText = data.searchText; this.bloodHoundIt(); } }) }
The bloodHoundIt() function code is below:
bloodHoundIt(){ this.bloodHoundApi.unleashBooldHound(this.authorizationKey, this.datePipe.transform( this.dStart,'yyyyMMdd'), this.datePipe.transform( this.dEnd,'yyyyMMdd'), this.searchText, this.supplier, this.barcode).subscribe((response)=>{ console.log(response); }); }
now when I run the code I get error msg:
TypeError: this.bloodHoundApi.unleashBooldHound is not a function
Any idea what I am doing wrong here .
Thanks
Posts: 1
Participants: 1
@heloroz wrote:
I always get the following : Cannot find module “.” as an error on my localhost when trying to run my application.
here is my app.component.ts
"import { Component } from ‘@angular/core’;
import { Platform } from ‘ionic-angular/umd’;
import { StatusBar } from ‘@ionic-native/status-bar’;
import { SplashScreen } from ‘@ionic-native/splash-screen’;import { LandingPage } from ‘…/pages/landing/landing’;
@Component({
templateUrl: ‘app.html’
})export class MyApp {
rootPage:any = LandingPage;
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
platform.ready().then( () =>
{
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
statusBar.styleDefault();
splashScreen.hide();
});
}
}"and my app.module.ts
"import { NgModule, ErrorHandler } from ‘@angular/core’;
import { BrowserModule } from ‘@angular/platform-browser’;
import { IonicApp, IonicModule, IonicErrorHandler } from ‘ionic-angular/umd’;import { MyApp } from ‘./app.component’;
// pages
import { AboutPage } from ‘…/pages/about/about’;
import { DiscoveryPage } from ‘…/pages/discovery/discovery’;
import { TabsPage } from ‘…/pages/tabs/tabs’;
import { DetailPage } from ‘…/pages/detail/detail’;
import { LandingPage } from ‘…/pages/landing/landing’;import { StatusBar } from ‘@ionic-native/status-bar’;
import { SplashScreen } from ‘@ionic-native/splash-screen’;@NgModule({
declarations: [
MyApp,
AboutPage,
DiscoveryPage,
TabsPage,
DetailPage,
LandingPage
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
AboutPage,
DiscoveryPage,
TabsPage,
DetailPage,
LandingPage
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler}
]
})
export class AppModule {}"
Posts: 1
Participants: 1
@peterwb wrote:
Started a new Ionic 4 sidemenu app and added Platform. Code below, on Safari and Chrome it returns Android for Platform and Versions. Any suggestions?? BTW, when running in iOS simulator the correct values are returned.
import { Component } from '@angular/core'; import { Platform } from "@ionic/angular"; import { Device } from '@ionic-native/device/ngx'; @Component({ selector: 'app-page-home', templateUrl: 'home.page.html', styleUrls: ['home.page.scss'], }) export class HomePage { myDevice: string; myHeight: any; myWidth: any; myPlatforms: any; myVersions: any; constructor(public platform: Platform, private device: Device) { platform.ready().then(() => { this.onDeviceReady(); }); } onDeviceReady() { if(this.platform.is('ios')){ this.myDevice = 'ios'; } if(this.platform.is('android')){ this.myDevice = 'android'; } if(this.platform.is('mobileweb')){ this.myDevice = 'web'; } if(this.platform.is('core')){ this.myDevice = 'web'; } this.myHeight = this.platform.height(); this.myWidth = this.platform.width(); this.myPlatforms = this.platform.platforms(); this.myVersions = JSON.stringify(this.platform.versions()); console.log('Device UUID is: ' + this.device.uuid); console.log('Device platform is: ' + this.device.platform); console.log('Device verision is: ' + this.device.version); } }
Results:
My Ionic Info:
Ionic: ionic (Ionic CLI) : 4.0.1 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.0.0-beta.0 @angular-devkit/core : 0.7.0-rc.3 @angular-devkit/schematics : 0.7.0-rc.3 @angular/cli : 6.0.8 @ionic/ng-toolkit : 1.0.0 @ionic/schematics-angular : 1.0.0 Cordova: cordova (Cordova CLI) : 8.0.0 Cordova Platforms : ios 4.5.5 System: ios-deploy : 1.9.2 ios-sim : 5.0.13 NodeJS : v9.5.0 (/usr/local/bin/node) npm : 6.2.0 OS : macOS High Sierra Xcode : Xcode 9.4.1 Build version 9F2000 Environment: ANDROID_HOME : not set
Posts: 2
Participants: 2
@rajbasilio wrote:
When I use command
ionic cordova run android
I’m able to invoke the emulator but I can’t see my app folder in the device. Previously I was having some problems with invoking the android emulator. So, I have downgraded it to 6.4V. Now I can open emulator using that command but I’m unable to get my app in the emulator
This is what I get in my cmd(node:8848) UnhandledPromiseRejectionWarning: CordovaError: Failed to execute shell command "getprop,dev.bootcomplete"" on device: Error: C:\Users\hi\AppData\Local\Android\Sdk\platform-tools\adb.exe: Command failed with exit code 1 Error output: error: device unauthorized. This adb server's $ADB_VENDOR_KEYS is not set Try 'adb kill-server' if that seems wrong. Otherwise check for a confirmation dialog on your device. at D:\product\project-1\frontend\platforms\android\cordova\lib\Adb.js:88:25 at _rejected (D:\product\project-1\frontend\platforms\android\cordova\node_modules\q\q.js:864:24) at D:\product\project-1\frontend\platforms\android\cordova\node_modules\q\q.js:890:30 at Promise.when (D:\product\project-1\frontend\platforms\android\cordova\node_modules\q\q.js:1142:31) at Promise.promise.promiseDispatch (D:\product\project-1\frontend\platforms\android\cordova\node_modules\q\q.js:808:41) at D:\product\project-1\frontend\platforms\android\cordova\node_modules\q\q.js:624:44 at runSingle (D:\product\project-1\frontend\platforms\android\cordova\node_modules\q\q.js:137:13) at flush (D:\product\project-1\frontend\platforms\android\cordova\node_modules\q\q.js:125:13) at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9) (node:8848) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:8848) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Posts: 1
Participants: 1
@dually8 wrote:
Hello everyone!
I was wondering if someone has been able to mix both a sidemenu and tabs in an ionic v4 app yet. Here’s a link to a sample app/code. https://github.com/dually8/IonicV4-SidemenuTabs
Thanks!
Posts: 1
Participants: 1
@Astrix wrote:
Hi all,
I’m using the phonegap nfc plugin. Upon writing a record and sending a tag, android beam UI is fired up.
I’m seeking an option to disable the UI, to make my app more automatic. Is there a way to do that?I found this topic:
https://developer.android.com/guide/topics/connectivity/nfc/advanced-nfc#foreground-dispatchWould someone be able to help me in this matter?
I will send a considerable amount of donation to the one who has a working code on hand.
Thanks in advance,
Astrix
Posts: 1
Participants: 1
@junerockwell wrote:
Has anyone tried to deploy an Progressive Web App to Internet Explorer 9/10/11 that’s built using Ionic 3?
This fictitious app does not have to work offline. I just want to know if the app runs and works stable in Internet Explorer.
Posts: 1
Participants: 1
@alfenas wrote:
I’m new to ionic development, I need to log in to an api, where I need to pass the login header and password in the base64 format, and also need to send the device device data, I’m not getting success, I’ve researched google, but nothing helped me
Can someone help me please?private dispositivo = { "device_id" : "cleiton_device", "device_os_version" : "5.0", "device_model" : "ASUS_T00J", "device_name" : "ZENFONE", "device_manufacturer" : "ASUS INC", "device_api_version" : "19", "device_width": "800", "device_height": "600", "push_key":"token_retornado_pelo_firebase_tanto_no_android_quanto_ios" }; constructor( public http: Http ) { } efetuarLogin(matricula:string, senha:string) { return new Promise((resolve, reject) => { let headers = new Headers(); //headers.append("Authorization", "Basic" + btoa(matricula + ":" + senha)); headers.append("Authorization", "Basic MjAyODkzMTUxOjAxMDEyMDAx"); headers.append('Content-Type', 'application/json'); console.log(headers); this.http.post(this.URL_API + '/login/loginapp', this.dispositivo, {headers: headers}) .subscribe(res => { resolve(res.json()); console.log(res) }, (err) => { reject(err); console.log(err); }); }); }
Posts: 1
Participants: 1
@akhromieiev wrote:
Got this error today, when tried “ionic cordova resources”
ionic cordova resources --force ✔ Collecting resource configuration and source images - done! ✔ Filtering out image resources that do not need regeneration - done! ✖ Uploading source images to prepare for transformations - failed! HTTP Error 503: POST https://res.ionic.io/api/v1/upload <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta charset="utf-8"> <title>Application Error</title> <style media="screen"> html,body,iframe { margin: 0; padding: 0; } html,body { height: 100%; overflow: hidden; } iframe { width: 100%; height: 100%; border: 0; } </style> </head> <body> <iframe src="//www.herokucdn.com/error-pages/application-error.html"></iframe> </body> </html>
Posts: 1
Participants: 1
@Xiwi wrote:
On my registration process I’ve got the option to register with or without uploading a profile avatar.
If I don’t want to upload any picture I display a spinner “Creating account…” till the user is created on the ddbb.
I do something similar for the avatar with another spinner using a progress bar. This is a component that I use on different places to upload images.
createAccount() { this.imageUploadProvider.uploadFile("Creating account").then(data => { console.log("image Uploaded!"); this.endpointsProvider.registration(this.user).then( res => { console.log('user created'); }, err => { console.log("NOT ok call ended: ", err); } ); }); }
Both functions work with promises.
The problem
I have 2 different spinner and when the image is uploaded that spinner hides and the next one appears. How can I remove this transition/animation between them?
Posts: 2
Participants: 1
@pareshmeb wrote:
I am using ionic storage to save a large amount of data.
I have got 33158 records of customer details and each record has 2-3 KB data.
Ionic storage fails to save 33158 records and it does not show any errors.
My app just hangs up while saving.Following plugins are used for my app.
“@ionic/storage”: “^2.1.3”,
“cordova-sqlite-storage”: “^2.1.3”,Any solutions will be much appreciated.
Posts: 1
Participants: 1