Pretty fast update . Thanks a lot
The platform "35729" does not appear to have been added to this project
Problem with AppMinimize and Android hardware back button
Hello. I am working on improving the functionality of the Android hardware back button handling that I have in place and have run into an issue when using the AppMinimize plugin.
When I hit the back button on certain pages, I want the app to minimize instead of going back. I have managed to achieve this, but when I reopen the app the backward navigation that was previously intercepted takes hold.
When I reopened the app after minimizing it, I see the back animation as if the router outlet’s pop function has been run. This is not desired behavior because I do not want the back button to ever do anything but minimize the app on certain pages.
Here is the code I am using:
this.platform.backButton.subscribe(event => {
if (this.router.url == "/home") {
this.appMinimize.minimize();
// this.routerOutlet.pop();
// this.routerOutlet.pop(0);
// this.nav.navigateRoot(this.router.url, false);
// None of the above 3 attempted fixes have helped.
// I have also tried monitoring when this backbutton subscription function callback is called, and it is only called once total
}else if(this.routerOutlet && this.routerOutlet.canGoBack()){
this.routerOutlet.pop();
// I have tried without this, it doesn't help
}
});
Background Geolocation isn't a Observable
I need Implement a Background Geolocation in my app. I acess this ionic documentation, there shows the code below:
this.backgroundGeolocation.configure(config)
.subscribe((location: BackgroundGeolocationResponse) => {
console.log(location);
// IMPORTANT: You must execute the finish method here to inform the native plugin that you're finished,
// and the background-task may be completed. You must do this regardless if your HTTP request is successful or not.
// IF YOU DON'T, ios will CRASH YOUR APP for spending too much time in the background.
this.backgroundGeolocation.finish(); // FOR IOS ONLY
});
When I used this code in my app, my ts-lint accuse the configure(config)
method is a Promise<any>
and not a Observable
, so, I cant use subscribe
. I switched subscribe
for then
. But when I run, shows this error below:
ERROR Error: Uncaught (in promise): TypeError: Object(...) is not a function
TypeError: Object(...) is not a function
at BackgroundGeolocation.configure (vendor.js:82333)
// error below ommited
Someone can help me?
Ionic 4: How to change font size?
Howdy -
I’m starting a new Ionic v4 app and the customer has asked for the font-size to be larger. Seems like a reasonable request.
I see documentation on Ionic CSS variables, including colors and --ion-font-family. However, I see no obvious way to customize font size.
What’s the recommended approach?
Thanks for the help,
Ben
IONIC bluetooth communication
Hello, I’m new using Ionic framework.
I’m trying to communicate one bluetooth connect to an Arduino with my app.
I have a button on my app that when pressed allowed the Arduino to start sending serial data.
ARDUINO
void loop()
{
if (bluetooth.available()>0) {
b1 = bluetooth.read();
command += b1;
Serial.print(command);
delay(100);
if (b1 == 'a'){ //Verifying if its allowed to send data
dados = bluetooth.write("180,190,30,50,20,15,35"); //Data
Serial.print(dados);
}
But when the app receive this data I have two problems
First:
I’m trying to reach all char array and separate my numbers, but every time I do that I received nothing in my toast message.
Second:
If I remove the while, the first time I read a message I received in my toast message and undefined.
IONIC
comBluetooth() {
var char: any;
var i: number = 0;
var o: number = 0;
var parada: any = ",";
var dados: number[];
var convert: any = "";
var tamanho: number;
this.bluetoothSerial.write('a');
this.bluetoothSerial.readUntil('n')
.then((dadoRecebido: any) => {
char = String(dadoRecebido);
tamanho = char.length;
while(i < tamanho){
if(char[i].localCompare(",") == 0){
dados[o] = parseFloat(convert);
o = o + 1;
}else{
convert = convert + char[i];
i = i + 1;
}
}
this.toast.create({ message: char, duration: 3000, position: 'botton' }).present();
this.bluetoothSerial.clear();
});
}
Could anyone help me with the correctly way to do this communication? As I said I’m new in ionic framework so any detailed information will helps a lot.
Thanks
IONIC bluetooth communication
I solved the second problem.
I think that putting write command allowing arduino to start sending data and just after read theses information was to fast to received all data.
Updating ionic v1 app with latest cli
No, i have since abandoned the project. But what needs to be done is port v1 code without npm dependency and use --v1 flag in latest cli. Probably thart will work.
Question with bypassSecurityTrustHtml(String: value)
this is my code
“<div [innerHTML]=“prodContent”>”
and
“this.prodContent = this.domSanitizer.bypassSecurityTrustHtml(this.product.content);”
in prodContent , it has html code.
for example,
“<p>text Showing</p><mg src=”//google.com/img/text*.jpg"><p>this is image.</p>"
when i am checking ionic on Chrome (localhosting).
Image shows well .
however, image is not showing on App.
i think “//” is not support “http://”.
how can i show image on App ?
please help me.
thanks.
Ionic cli new project Freezes up
I am trying to start a new project in the ionic framework with the following command
ionic start MyFirstIonic blank
However, no matter what I try the command prompt just sits there and blinks and eventually goes unresponsive. I had downloaded everything I needed to run an application about a month ago and everything seemed to work just fine. However, now when I try to create a new project it just freezes
I have a school project I am needing to get done and this is really stressing me out. I have tried the following solutions but to no avail.
-Cleaning the cache
-uninstalling and reinstalling ionic and cordova
-uninstalling/ reinstalling node
-installing an earlier version of node (V8.11)
- Going to my app roaming and deleting npm and npm cache
None of these proposed solutions i found online seem to work
If anyone has any ideas on how to get my programming environment up and running I would greatly appreciate it! I am already running behind on my assignments and really do not wish to fall even further behind.
Here is a screenshot of what’s going on.
How Reinstall Ionic Version 3 with Correctly
Hai I have some problem with my ionic so was uninstalled it and now how to reinstall it with Correctly…
I want like this again :
ionic (Ionic CLI) : 4.5.0
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.1
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Thanks
Problem social-sharing ionic v 3
hei friend at import dont use ‘ngx’ i just want you to chect thats folder
and for ionic v 3 use “cordova-plugin-x-socialsharing”: “4.x.x”,
Errror using plugin AdmobFree
I have fix this issue
thanks friends…
Ionic 4 & Google Maps plugin
Many people use ionic-native/google-maps@5.x with cordova-plugin-googlemaps v2.5.0
Ionic 4 & Google Maps plugin
Ionic sabotages working.
Refused to apply style from 'http://localhost:8100/build/main.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled
npm install @ionic/app-scripts@latest --save-dev
worked for me
thank you
Ionic native Docuement viewer, File , File transfer plugins are not working in Ipad air with ios 12 and using Xcode 10
Hi guys ,
I am working on a opening a Pdf file in my application as locally or by downloading from internet using Document viewer , File , File transfer . i write the same code mentions on official website of ionic native framework of document viewer . i attach a function on click on button to open pdf files . and for testing purpose . i write console.log before starting the function’s code and also in the end . first console is printing the output and then my code and last console . first console is printing the output but code and last console is not working . here is my code ,…
openpdf(){
console.log(“pdf view button clicked”);
const options: DocumentViewerOptions = {
title: ‘My PDF’
}
this.document.viewDocument(‘assets/First_Step_Vol.1_6.pdf’, ‘application/pdf’, options)
//this.navCtrl.push(OpenpdfPage);
console.log(“pdf view link opened”);
}
i tried to use absolute path by writing www before assets and the remove the platform and then again add it . and the ionic cordova prepare ios command and then ionic cordova build ios – --buildFlag="-UseModernBuildSystem=0" and then opened the xcodeproject file in the Xcode 10 and clean and build the for ipad ios 12 and the deployed to ipad with no error . but after click on button nothing is happening with no errors . and same way streaming media is not playing the video but showing the page with play/pause/volumn button.
Kindle resolve this issue .
Lookup table, efficient approach?
Hi all!
The TL;DR is I need to translate or map some numeric data to a readable string using lookup tables stored on Firebase.
I have a functional Ionic V3 app which integrates firebase.
I have some data that is being stored and accessed in this format:
Message in Raw Format:
Key1: number;
Key2 :number;
I then have two conversion tables which are key-value pairs of each key to a plain string translation (possibly supporting multiple languages in future)
ie.
Key1 Lookup:
0: "Thing A",
1: "Thing B",
2: "Thing C"
Key2 Lookup:
0: "OK",
1: "Bad",
2: "Worse"
The first lookup table has ~3500 items and will require modification in the future as new features are added. The second has only ~20 or so and is likely static.
I’d like to store these tables on Firebase and use them to translate the stored data to readable text in the app.
I have a working implementation using a local dictionary/map and an pipe (thispipe) handling the translations.
<ion-col> {{ (item?.key1) | thispipe}} </ion-col>
I’d like to utliise the firebase stored key:values instead of a local dictionary to keep app size down and improve maintainability, and I think it would be neater to handle the translations inside the pipe(map) in my data service - similar to this:
//The following code is working nicely, but utilised a local/hardcoded lookupTable
private getReadableFromDataSub(): Observable<DeviceDataReadable> {
return this.afdb.list('somelocation').valueChanges().pipe(
map(x => new DisplayPacket(x, this.lookupMap))
//this translates the raw data to human readable using a local lookupMap
);
}
//note this is local, I want to use firebase data or sync'ed local data
private setupLookup() {
this.lookupMap.set("92", {name:"Engine Percent Load At Current Speed", unit: "%"});
this.lookupMap.set("100", {name:"Engine Oil Pressure", unit: "kPa"});
this.lookupMap.set("158", {name:"Keyswitch Battery Potential ", unit: "V"});
this.lookupMap.set("171", {name:"Ambient Air Temp", unit: "°C"});
this.lookupMap.set("190", {name:"Engine Speed", unit: "RPM"});
this.lookupMap.set("sig", {name:"Cell Signal", unit: "bars"});
}
I’d appreciate any advice! Hopefully I’ve made it somewhat clear what I’m after!
Kind Regards,
Alex
E2E testing when using @ionic/storage
I’m using @ionic/storage in my app, to store some values.
Now I’ve started making E2E tests, and i struggle figuring out how to access that (@ionic/storage) storage, and not just the browsers default local storage. Anyone that can point me in the right direction?
Thanks in advance.
Lars
The platform "35729" does not appear to have been added to this project
After downgrading started working. Tried upgrading node as well, but didn’t seems to be working with latest version of ionic.
Ionic 4 tab-bar cutting content
Howdy
Please help me with css in Ionic.
Now I have layout like this :
My button was cut
I try to add “overflow: visible” for all of tags, but it’s doesn’t work.(
.place-button-wrapper{
position: absolute;
bottom: 20px;
}
<ion-tabs>
...
<ion-tab-button tab="places">
<div class="place-button-wrapper" >
<img class="tabs-icon" src="assets/icons/mapiconelepse.png" alt="">
</div>
</ion-tab-button>
...
</ion-tabs>