Why aren’t y’all just using SubtleCrypto?
Node-forge store rsa.keyPair
Create single connection for entire application
Components should not be doing networking stuff. Move all that into a service provider.
Help us test the Ionic 5 Release Candidate!
you are fast! that did the trick, now it is working even in the chrome iphone preview!
thank you very much!
Ion Date Time Picker - Circular functionality
Create single connection for entire application
How to do that, I am beginner, soo please help me.
Screenshot disable for Ionic Inappbrowser
I want to disable the screenshot in the ionic app which uses native inappBrowser.
I read the ionic documentation.
The thing which I understand is, In latest version of ionic, the screenshot is disabled by default. And we can take a screenshot by https://ionicframework.com/docs/native/screenshot
But I want to disable the screenshot from the app.
“@ionic-native/in-app-browser”: “^5.20.0”,
Trying to generate and run apk
hello all: am trying to run my ionic app, to get apk file but i face this error:
[08:57:13] tslint: …Users/IBM/Documents/ionicproj/refresh/src/pages/product-detail/product-detail.ts, line: 15
All imports on this line are unused.
L14: import { TranslateService } from '@ngx-translate/core';
L15: import { CartPage } from '../cart/cart';
L16: import { ReviewsPage } from '../reviews/reviews';
[08:57:13] lint finished in 10.02 s
cordova.cmd build android --release
Android Studio project detected
ANDROID_HOME=C:\Users\IBM\AppData\Local\Android\Sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_211
studio
Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd build android --release exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Trying to generate and run apk
Remove those 3 imports if you are not using them.
Send data from one component to other
Hi all, I have chatHome.html and chatHome.ts, to display user-related ChatData
below is my chatHome.ts code, at first it call showResult() to fetch chat Home data.
showResult(event) {
if(this.loader!=null){
this.loader.present();
}
this.makeSocketConnection();
this.connection = this.chatService.getMessages(this.user, this.pageno,this.socket).subscribe(message => {
// this.socket.disconnect();
});
makeSocketConnection() {
var url = "http://" + this.ip + ":" + this.port + "/";
if(this.socket===undefined||!this.socket.connected){
this.socket = io(url);
this.socket.emit('add user', this.user);
this.storage.set('socket',this.socket) ;
// this.chatService.setSocket(this.socket);
}
}
chatHome.html is below code
<ion-content style="position: relative;overflow: auto; height: 100%; " class="has-footer" >
<div [formGroup]="myGroup" >
<ion-row >
<ion-searchbar *ngIf="showSearchBar" formControlName="searchMsg" [(ngModel)]="searchWord" (search)="onSearchMsg()" name="searchMsg" style="border: 1px solid #eee;">
</ion-searchbar>
</ion-row>
</div>
<div *ngIf="searching" class="spinner-container"> <ion-spinner></ion-spinner>
</div>
<ion-list *ngFor="let mes of splitData let i = index"
style="padding-left: 1px;padding-right: 10px;margin: 0;">
<div class=""
(click)="chatByRefId(mes.title,mes.msgFrom,mes.msgTo,mes.room,mes.refId,mes.parentRefId,mes.tetraId)" >
<ion-card-content style="border-radius:5px;margin-left: 5px;">
<!-- <div><span style="color:#000;" class="fn-sz-sth"><b>{{getUserName(mes.msgFrom)}}</b></span></div> -->
<ion-row align-items-center style="margin-left: -7px;margin-bottom: -13px;">
<ion-col size-sm style="padding:0px;padding-left: 6px;width:60% !important">
<p class="ellipsis fn-sz-sth" style="color:#555;line-height: 15px;">
<b> {{getUserName(mes.msgFrom)}}</b>
</p>
</ion-col>
<ion-col size="3" size-lg offset="3" style="padding:0px;padding-left: 6px;">
<p class="category-description" style="color:#555;font-size: 1rem !important;text-align: right;margin-top: 5px;" >
{{mes.createdOn| date :'medium'}} </p>
</ion-col>
</ion-row>
<span style="color:#555;font-size: 1em;line-height: 15px;" class="fn-sz-sth"><b>{{mes.title}}</b></span>
<div [innerHTML]="mes.msg" class="category-description fn-sz-sth"
style="color:#555;margin-bottom: 0px;font-size: 0.8em;"></div>
<!-- <span class="category-description" style="color:#000;font-size: 1.1rem;margin-left: 60%;margin-top: 5px;">
{{mes.createdOn| date :'medium'}}
</span> -->
</ion-card-content>
</div>
</ion-list>
<div *ngIf="!hasMoreData" style="text-align: center;margin-top: 10px;"><b></b>{{datLoadStatus}}</div>
<ion-infinite-scroll (ionInfinite)="loadData($event)" style="height:0;min-height: 0;" position="bottom">
<ion-infinite-scroll-content ></ion-infinite-scroll-content>
</ion-infinite-scroll>
<ion-infinite-scroll (ionInfinite)="calledTop($event)" style="height:0;min-height: 0;" position="top">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>
So from above code on clicking chatHome item, am navigating to chatHistory page by callingchatHistoryOnId(), here am unable to use same existed socket in chatHistory component so please help me. how to approach.
I have chatHistoryCompo.ts
below is my code.
// get the datachat history based on Id
public chatHistoryOnId(pNo,socket): any {
// this.loader.present();
//this.socket = this.chatService.getSocket();
this.socket = socket;
var id = this.loginService.getRefId();
//this.makeSocketConnection();
this.socket.emit('chatsByRefId', { refId: id,page_no:pNo });
let observable = new Observable(observer => {
this.socket.on('chatsByRefId', (data) => {
observer.next(data);
//this.socket.disconnect();
// this.makeSocketConnection();
// console.log("chatsByRefId " + JSON.stringify(data) + " ");
});
return observable;
})
return observable;
}
Ionic select CompareWith
I’m sorry I could not get you. Please correct my code.
Or kindly let me know how to correct it.
Can we use ion-buttons in ion-grid?
I have try to use ion-buttons inside of ion-grid it’s not positioned correctly,are there any alternatives?
Ionic cordova build android not creating apk file
Hi sahibsingh,
Did you find the solution for this.
Nordic DFU Firmware Upgrade with BLE
you should ti use a wrapper of the fork that support UpgradeFirmware function, for now the wrapper npm i @ionic-native/ble don’t support this function
Unable to upload large PDF files using file transfer plugin in ionic 4
I am getting timeout error while uploading large PDF files with help of Cordova File Transfer plugin in IOS but in Android it’s working fine.
I am getting error as below:
FileTransferError {
body = “”;
code = 3;
“http_status” = 0;
source = “/private/var/mobile/Containers/Data/Application/A2168459-B3ED-4329-BDFE-F2B68E00B937/tmp/com.vghybrid.snfreferral-Inbox/Scan_Test_-_39_pages_test-1-1.pdf”;
target = “https://snfscan.com/customapi/api.php”;
}
I have tried adding ‘Connection: “close”’ to header & ‘chunkedMode: false’ but nothing worked.
Can anyone help me to get out of this issue I am struggling with this from last few days.
ERR_CONNECTION_REFUSED Ionic 3
Problem is still there
Ionic cordova build android not creating apk file
Do you find any solution?
Check my Blog -> [Eagrovision](https://eagrovision.com)
Ion-icon doesn't work with an array of icons names
Hello!,
I’m having an issue with ion-icon,
I’ve a list of icons names I get from a GraphQL query in my TypeScript component and I want to use them to show into my html component ion-icon which is inside of ion-list.
The issue here is that my ion-icons are not rendering at all. When I’m putting an ion-label next to the ion-icon it gives me the names of icons I want to use.
Any ideas how to make it work ?
Thanks everyone!
Ion-icon doesn't work with an array of icons names
Hello,
please share html part to understand your situation. also share error
Ionic Capacitor on older ios devices
For anyone with the same issue, it was because Capacitor only runs on the 2 most recent versions of iOS. The target iOS was never supported by Capacitor.
How to change Push notification sound
Can anyone tell me how to use custom sound to push notification (Not local notification), currently i am using default sound for receiving notification but i want to change default sound to my other sound file.
thanks
this.http.post(‘https://fcm.googleapis.com/fcm/send’,
JSON.stringify({
notification: {
title: “Hello”,
body: " needs your help!",
sound: “default”, //want to change default to custom sound
click_action: “FCM_PLUGIN_ACTIVITY”
},