I want to ask one general question here, We have seen 32 bit and 64 bit Operating System.
Is there any other larger size bit Operating System exist? If yes can you please share the link to download it.? i want the best speed operating system.
Thanks
Better operating system than 64 bit?
Local files on IOS device : can write but not read any file
Thanks @VictorNorman for your reply.
I have found this solution and realized that I had to both convert and sanitize the local url
protected fixURL(url: string): string | SafeUrl {
if (this.platform.is('cordova')) {
const win: any = window;
const fixedURL = win.Ionic.WebView.convertFileSrc(url);
return this.sanitizer.bypassSecurityTrustUrl(fixedURL);
} else {
return url;
}
}
But now I am stucked with dynamic background-image on angular…
I have tried all these options, none of them display the image
<ion-card [style.backgroundImage]="'url(' + fixURL(url) + ')'"></ion-card>
<ion-card [style.background]="'url(' + fixURL(url) + ')'"></ion-card>
<ion-card [style.background-image]="'url(' + fixURL(url) + ')'"></ion-card>
<ion-card [ngStyle]="'url(' + fixURL(url) + ')'"></ion-card>
Error message in console
fixURL > SafeValue must use [property]=binding: ionic://localhost/_app_file_/var/mobile/Containers/Data/Application/B751E65D-DEAE-4292-BC08-3EAB25E76E1C/Library/NoCloud/135/135.jpg (see http://g.co/ng/security#xss)
Any idea why working with image but not background-image…?
[Unsolved] Autosize grid fullscreen
hey did find the solution for this ?
Local files on IOS device : can write but not read any file
Sorry, but I haven’t done anything with background images, especially in ion-cards. Looking at the ion-card docs, it appears you are supposed to set the background with --background
, but I’m not sure if that helps you for this problem at all.
Is this error message coming from the
return this.sanitizer.bypassSecurityTrustUrl(fixedURL);
call or from somewhere else?
Ionic 4 - How to check current page is on root or not?
Can any one help me with to check current page is in root or not??
Please help me out…
Ionic 4 ViewController is not exists
In ionic 4 viewController is not exists, How to check the view stacks??
App Icons badging-api
Hi,
i am thinking about creating a kind of news website with a notification function using ionic / pwa.
It would be important to be informed about new messages, even if you haven’t opened the page.
Has anyone had any experience with badging-api and how to use it effectively with ionic?
Ionic Menu Questions (Ionic 4)
Hello guys,
I’ve two Angular components. The first contains a button to show/hide the side navigation.
- component:
<ion-menu-button>buton
<ion-icon slot="start" name="menu"></ion-icon>
</ion-menu-button>`
2.component
<ion-split-pane>
<ion-menu contentId="sideMenu" type="overlay">
<ion-header>
<ion-toolbar>
<ion-title>Side Menu</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-list>
<div *ngIf="navigationElement.data">
<ion-menu-toggle auto-hide="false" *ngFor="let item of navigationElement.data.sideNavigation">
<ion-item>
<ion-label>{{item.title}}</ion-label>
</ion-item>
</ion-menu-toggle>
</div>
</ion-list>
</ion-content>
</ion-menu>
<ion-router-outlet id="sideMenu" main></ion-router-outlet>
</ion-split-pane>
<ion-split-pane>
<ion-menu contentId="sideMenu2" type="overlay">
<ion-header>
<ion-toolbar>
<ion-title>Side Menu</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-list>
<div *ngIf="navigationElement.data">
<ion-menu-toggle auto-hide="false" *ngFor="let item of navigationElement.data.sideNavigation">
<ion-item>
<ion-label>{{item.title}} 2</ion-label>
</ion-item>
</ion-menu-toggle>
</div>
</ion-list>
</ion-content>
</ion-menu>
<ion-router-outlet id="sideMenu2" main></ion-router-outlet>
</ion-split-pane>
How are the ion-menu-button in the first component and the ion-menu in the second component are connected? For testing purposes I added a second side menu in the second component. Now only the second toggles and the first is ignored.
Images not loading in mobile
.bg-image{
–background: url(/assets/bg.png) no-repeat center center fixed ;
background: url(/assets/bg.png) no-repeat center center fixed ;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size:cover;
}
this worked for me. No idea why is background and --background needed
Ionic Menu Questions (Ionic 4)
What version of ionic are you working in? Ionic 4?
Ionic Menu Questions (Ionic 4)
yes, I updated the description.
Camera - saving image
Why picture taken with camera vary in size depending on location saved.
Using this options to take picture; ( Android )
const options: CameraOptions = {
quality: 70,
destinationType: this.camera.DestinationType.NATIVE_URI,
saveToPhotoAlbum: true,
targetWidth: 1440,
targetHeight: 1440,
correctOrientation: true,
mediaType: this.camera.MediaType.PICTURE
}
image is saved to :
file:///storage/emulated/0/Android/data/io.ionic.testapp/cache/1561638850147.jpg
and it is about 50kb, but image saved to photoalbum ( Pictures folder ) is 1,5 MB !? Why? They look exactly same in quality.
I tought that first image ( cached ) is erased after device restart but it’s not, as I can see only difference is in location, and either i uploaded to server are same quality and JPG format, but not file size.
Self-signed certificate https doesnt work in release build
thx works in ionic 4 too. In cordova 7+ /SystemWebViewClient.java instead of /CordovaWebViewClient.java
Ionic 4 - How to check current page is on root or not?
I don’t know if there is some elegant/simple way to do this. What I would do is change if (status)
to be something like if (getTheValueFromAService())
. Described below.
Then, when you are displaying the root page, you set the variable to true, and otherwise, you set it to false.
Now, the question is, where does this variable onRootPage
live? I’d implement this by creating a super small service component that has a get()
and setOnRootPage(tOrF)
. Let’s call this provider OnRootPageService
. You can then use injection to get a hold of this object on all pages, and you can call get() or set() on it.
E.g., suppose you’ve created the service, then in your home.page.ts (assuming that is your “root” page), you might put:
<imports here...>
export class HomePage {
constructor(private onRootSvc: OnRootPageService) {
this.onRootSvc.setOnRootPage(true);
}
// called when you display this home page.
ionViewWillEnter() {
this.onRootSvc.setOnRootPage(true);
}
...
}
Use the same kind of injection on other pages, but set the value to false.
Then in the file where you are doing the backButton.subscribe(...
code, use injection to get a variable this.onRootSvc
and write if (this.onRootSvc.get())
, which will be true if you are on the root page.
Hope this helps and isn’t too complicated. See https://www.joshmorony.com/when-to-use-providersservicesinjectables-in-ionic/, although it is a little old and calls services “providers”.
P.S. Create a service by doing ionic generate service OnRootPage
from the command line.
No answer from native plugins
hi i moved my code that works well after compile develop from windows 7 pc to windows10. I reproduce the same development configurations, but after compile on windows10 native plugins do not respond ie the camera, imagepiker, documentviewer, TTS etc … what should I do? Thank you in advance.
Self-signed certificate https doesnt work in release build
had the same problem
try this in \app\platforms\android\CordovaLib\src\org\apache\cordova\engine\SystemWebViewClient.java
ca row 228
use handler.proceed(); instead of super.onReceivedSslError(view, handler, error);
ApplicationInfo appInfo;
try {
appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
// debug = true
handler.proceed();
return;
} else {
// debug = false
//super.onReceivedSslError(view, handler, error);
handler.proceed();
}
} catch (NameNotFoundException e) {
// When it doubt, lock it out!
super.onReceivedSslError(view, handler, error);
}
worked for me with ionic 4 anc cordova andrid @7.1.4
Ionic Menu Questions (Ionic 4)
In Ionic 4 (at least), you need to set menu="menuName"
in the ion-menu-toggle
element in your html. See https://beta.ionicframework.com/docs/api/menu-toggle
The menuName
must match the menu’s menuId
you’ve defined in app.component.ts. Note what the doc says: “if this property is not used, ion-menu-toggle will toggle the first menu that is active.” I’m not sure what that means, but it probably means the first menu defined in that file… who know…
Does this help?
Firebase App unable to Compile on Android with AAPT error
This solution worked for me paired with this fork of cordova-plugin-firebase:
Thanks!
I cannot install cordova-res
Thank you very much!!! this really helped me
Ionic ion-button in tabs root page not working in tabs pages
I have created an ionic application which have a page that consists of 4 tabs the problem is the base page of the tabs is service-details which has a select box in header and ion-tabs in content. When I trigger the ionChange being inside of the base page it works fine but when I move to a tab and trigger ionChange from the base page it give me error. Here is the service-details.html
<ion-header>
<ion-toolbar>
<ion-buttons slot="start" defaulthref="/service-category">
<!-- <ion-back-button></ion-back-button> -->
<ion-icon name="menu"></ion-icon>
</ion-buttons>
<ion-buttons slot="end">
<ion-icon name="notifications"></ion-icon>
</ion-buttons>
<ion-title text-center>Select Services</ion-title>
</ion-toolbar>
</ion-header>
<ion-item class="branch-detail">
<ion-icon name="pin"></ion-icon>
<ion-label>You are in</ion-label>
<ion-select placeholder="" (ionChange)="onBranchChange($event)">
<ion-select-option *ngFor="let item of branches;" value="
{{item?.Id}}" (ionChange)="onBranchChange($event)">{{item?.Name}}
</ion-select-option>
</ion-select>
</ion-item>
<ion-content>
<ion-tabs padding-top>
<ion-tab-bar slot="top">
<!-- <ion-tab-button tab="packages">
<ion-label>Packages</ion-label>
</ion-tab-button> -->
<ion-tab-button tab="face" >
<ion-label>Face</ion-label>
</ion-tab-button>
<ion-tab-button tab="hair">
<ion-label>Hair</ion-label>
</ion-tab-button>
<ion-tab-button tab="nail">
<ion-label>Nail</ion-label>
</ion-tab-button>
<ion-tab-button tab="body">
<ion-label>Body</ion-label>
</ion-tab-button>
</ion-tab-bar>
</ion-tabs>
</ion-content>
Here is the function onBranchChange() in service-details.page.ts
onBranchChange($event){
this.appointments.BranchId=$event.target.value;
}