Quantcast
Channel: Ionic Forum - Latest posts
Viewing all 228529 articles
Browse latest View live

Ionic Menu Questions (Ionic 4)


SubscribeWithPriority unsubscription in app.component.ts

$
0
0

The thing is I found a way to unsubscribe a normal subscription in NgOnDestroy but it is not working with subscribeWithPriority.

this.platform.backButton
.pipe(takeUntil(this.ngDestroyed$))
.subscribeWithPriority(0, async () => {}

It returns an error:
Property 'subscribeWithPriority' does not exist on type 'Observable<BackButtonEventDetail>'

VPN plugin for IONIC

$
0
0

Hi ,
I have an application that needs to be connected to the company’s VPN. Today before entering the application we login to the VPN using Palo Alto’s global protect. Is there any way to stop using global protect and connect to VPN through the App? Is there a plugin?

I took a look at the https://github.com/aquto/cordova-plugin-vpn plugin but could not get it to work with IONIC.

Loading Controller, dismiss() is called before present() which will keep spinner without dismissing

$
0
0

I am using Ionic 4 and trying to implement loadingcontroller as a service and want to use in multiple pages.
I followed the solution provided here. But the solution seem to have hardcoded with the delay of 5000. In realtime that is not an effective way of doing right. Can you please recommend the approach that I have to take to achieve it.

@mhartington @Ben @mattkremer @brandyshea

Ionic 4 slow performance on user interaction

$
0
0

Hello everyone,

I also met a performance problem on ionic projects 4. to demonstrate this problem I created a repo that displays a list with 2000 item, the difference is quite important between ionic 3 and ionic 4, with ionic 3 list is displayed in less than a second on a mac book pro with ionic serve, but with ionic 4 the display of 2000 items takes 4 seconds. you can test it yourself on this repo.

according to the study that I realized the problem comes because of the shadow dom the shadow dom injects enormously elements in the dom contrary to ionic 3 or there is not the shadow dom.

you can do a simple test, in this file from my ionic-tests / modal-ionic / ionic-4-angular / src / app / pages / modal / modal.page.html repo,
replace this code:

<ion-list>
    <ion-item * ngFor = "let item of items">
      <ion-label> {{item}} </ ion-label>
    </ion-item>
</ion-list>

by this code:

<div>
    <div * ngFor = "let item of items">
       <div> {{item}} </ div>
    </div>
</div>

and look at the console.

with the div you will earn almost 3 seconds on a mac book pro.

Ionic 3 android app crashes while making payment through razorpay payment gateway

$
0
0

I’ve integrated razorpay payment gateway in my ionic 3 Android app, after filling the details, the app gets crashed before I call the callback method to check whether the payment successful or not. Please suggest

Error: resource android:attr/fontVariationSettings not found

$
0
0

getting below error while doing initial setup

/home/kalandher.s/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/fe60ba1e2fc433e77557653054dbc233/res/values/values.xml: AAPT: error: resource android:attr/fontVariationSettings not found.
    

/home/kalandher.s/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/fe60ba1e2fc433e77557653054dbc233/res/values/values.xml: AAPT: error: resource android:attr/ttcIndex not found.
    
/home/kalandher.s/Documents/work/trunk/skylark/platforms/android/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:237: error: resource android:attr/fontVariationSettings not found.
/home/kalandher.s/Documents/work/trunk/skylark/platforms/android/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:237: error: resource android:attr/ttcIndex not found.
error: failed linking references.

Failed to execute aapt

com.android.ide.common.process.ProcessException: Failed to execute aapt

below is my properties.gradle file

target=android-26

android.library.reference.1=CordovaLib

cordova.gradle.include.1=cordova-android-support-gradle-release/appname-cordova-android-support-gradle-release.gradle

cordova.system.library.1=com.android.support:support-v4:24.1.1+

cordova.system.library.2=com.android.support:support-v4:+

cordova.system.library.3=com.android.support:support-annotations:27.+

cordova.system.library.4=com.android.support:support-v4:26.+

cordova.system.library.5=com.squareup.okhttp3:okhttp-urlconnection:3.10.0

cordova.system.library.6=com.android.support:appcompat-v7:26.+

cordova.gradle.include.2=cordova-plugin-firebase/appname-build.gradle

cordova.system.library.7=com.google.android.gms:play-services-tagmanager:+

cordova.system.library.8=com.google.firebase:firebase-core:+

cordova.system.library.9=com.google.firebase:firebase-messaging:+

cordova.system.library.10=com.google.firebase:firebase-config:+

cordova.system.library.11=com.google.firebase:firebase-perf:+

gradle version : Gradle 4.4.1

Ion-select interface="popover" width enlarge

$
0
0

I’m trying to work on this too. You can try setting css like this…
.popover-content {
max-width: 100%;
width: 100%
}
Although I’m trying to find a more elegant solution than this, at least a way to target only specific ion-selects popovers
Note: This assumes you’re using interface=“popover” on your ion-select


Error: ENOENT: no such file or directory, open 'platforms/android/app/build/outputs/apk/debug/app-debug.apk'

$
0
0

Thanks, I have removed the platform, upgraded the cordova-android@7 and installed platform again but ends with the same error

> cordova build android --device
[app-scripts] [19:35:21]  lint finished in 15.68 s 
> native-run android --app platforms/android/app/build/outputs/apk/debug/app-debug.apk --connect --forward 8100:8100
[native-run] Selected hardware device 8a0ad564
[native-run] Error: ENOENT: no such file or directory, open 'platforms/android/app/build/outputs/apk/debug/app-debug.apk'
[ERROR] An error occurred while running subprocess native-run.
        
        native-run android --app platforms/android/app/build/outputs/apk/debug/app-debug... exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.

Ionic 4 - How to check current page is on root or not?

$
0
0

canGoBack - Returns true if the current view can go back.

InAppBrowser not working in Android as it is in iOS

$
0
0

Hi

Hopefully, someone can help me.

I have a very simple App using the InAppBrowser plugin. On iOS it works perfectly fine when I touch a button the URL loads using “_blank” and the default navigation is present.

However on Android when I touch a button I just get a blank white screen. I did a test and added a plain link using href tags and that takes me to the URL. Once I have visited the URL via the link the buttons will then work. It is like the URL is blocked from loading when using the buttons. The default InAppBrowser navigation is not present too.

Button details
home.page.ts - openBlank() {
this.iab.create(‘url.com’, ‘_blank’,{ location: ‘no’});
}

home.page.html - <ion-button class=“button” expand=“block” (click)=“openBlank()”>My Coaching Journey

Link details
home.page.html - < a href=“URL” onclick=“window.open(‘URL’, ‘_blank’, ‘location=no’);”>lINK< /a >

Hopefully this is something simple I am missing.

Thanks

IONIC 4 : Loading Controller, dismiss() is called before present() which will keep spinner without dismissing

$
0
0

What do you want instead of the hardcoded 5000?
You say, “recommend the approach that I have to take to achieve it”. What do you mean by “it”? What are you trying to achieve?

Unexpected token. A constructor, method, accessor, or property was expected

Ionic Native Secure Storage Not Working on Android Q

$
0
0

We are having an issue with the Ionic Native Secure Storage plugin. When run on Android 9.+ API 29, an exception is being thrown:

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.android.credentials.UNLOCK }

The Secure Storage plugin is a major player in our app. Is anyone else having this issue? Would anyone know of a good fix for this?

How to build ionic app for ios

$
0
0

Search the forums for ‘white screen’ for various solutions.


Crop Image Error

$
0
0

when base64 Image crop in ionic 4, show error {“message”:“Image doesn’t not exist”.
How can i solve?

IONIC 4 : Loading Controller, dismiss() is called before present() which will keep spinner without dismissing

$
0
0

@VictorNorman Thanks for your time. I want to create a service that instantiates a loader and presents it. I also want to write a method as part of service to dismiss it. The approach given in the link shared uses delay of 5 seconds while presenting it. In real world scenarios we should not hard code the value as the response time depends on the data speed, data that is being passed over the wire and the network speed. So when I try to remove the delay from the logic and run the app the loading icon stay for ever. Do you know how to solve the problem?

One way I know is
async startLoad(options: any = {}): Promise {
return await this.loadCtrl.create(options);
}

const loader = await this.loadingSvc.startLoad();
await loader.present();
// do some stuff
await loader.dismiss();

But if I follow this approach I will end up creating variable for loader in every page which I feel is little dirty. Is there a better way to solve the problem?

Hope you understood what I worrying about, thanks in advance :slight_smile:

Ionic Native Secure Storage Not Working on Android Q

$
0
0

It appears that cordova-plugin-secure-storage is no longer maintained. This is a big problem. Does anyone have any suggestions on any other cordova plugins that allow for secured storage?

PWA - How to access Cordova plugins in PWA web applications ?

$
0
0

Network Error when testing on device with livereload

$
0
0

This is a case I’ve NEVER seen before, and I’m totally stuck!
I run ionic cordova run android -lc as usual to test it on my device (Samsung Galaxy S4) and get

Application Error
There was a network error (http://localhost:8100/)

Chrome debug just has the following line…

Failed to load resource: the server responded with a status of 404 (Not Found)

This is normal if there’s no Wifi connection, but I’ve confirmed that the connection works fine. I tried on an iPhone and just got a blank screen, with some network-connection-related issues appearing in the log.
If I navigate to localhost:8100 on my browser on the computer, it works.

I even removed and readded teh Android platform and the iOS platform, still the same issue, and config.xml has
<allow-navigation href="*" />

If I run it without livereload, it works fine, but I won’t be able to debug it!

Please help!! This is really urgent and the app is facing launch delays till this is resolved!
Thanks.

Viewing all 228529 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>