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

Login when clearing RAM

$
0
0

I’ve created a mobile app in which you have to login in order to get to the other pages. Every time I reload the page I get back to the login page. I wonder if I fully convert my files in the .apk file will the same happen if the user has already logged in and once they clear the ram they have to login again? And if this can happen how can I fix it?

The code that sends you back to the login page:
app.component.ts file

export class AppComponent {
  constructor(
    private platform: Platform,
    private splashScreen: SplashScreen,
    private statusBar: StatusBar,
    private storage: Storage,
    public navCtrl : NavController
  ) {
    this.initializeApp();
  }
  initializeApp() {
    this.platform.ready().then(() => {
      this.statusBar.styleDefault();
      this.splashScreen.hide();
    });
    this.storage.get('storage_xxx').then((res)=>{
      if(res == null){
        this.navCtrl.navigateRoot('/home');
        //home is the login page
      }
      else{
        this.navCtrl.navigateRoot('/homepagee')
       //homepagee is the index page
      }
    });
  }
}

AdMob Free Integration

$
0
0

I integrated admob free into my ionic 5 app but I have some issue to show real banners.

I installed the plug and followed the instructions.

I configured the banner on admob (standard and interstitial).

If I configure test google banner. it works.

When I configure real banners, I always receive error 3, no fill.

It’s very strange. It is impossible that I don’t have banner availability for my zone (Italy)

I built android app and ios app. For both I have the same issue

Any help would be much appreciated

Can't seem to get "beforeRouteUpdate()" to work

$
0
0

i think this is used in the router? This doesn’t look like the code for a router…

Managing Form Validation with Custom Form Components And Vee-Validate

Double splash screen with with flash in between

$
0
0

Hello,
Yes actually this solution introduced a delay. When the user taps the app icon the time that would be spent watching at the first splashscreen is spent instead looking at the other app icons on his phone and it can be annoying as it may seem to the user that they haven’t tapped correctly the app icon they have just launched. It takes a few seconds to load the second splashscreen so I decided to keep the flashing but I made the flashing black. Look at my capacitor.config.json file, as you can see there is android backgroundColor set to black. This is the best solutions I’ve found so far.
Anyway thank you for trying to sort it out. I have looked around so much all day but your post here is the best I found for capacitor.

{
  "appId": "io.ionic.starter",
  "appName": "test",
  "bundledWebRuntime": false,
  "npmClient": "npm",
  "webDir": "www",
  "android": {
    "backgroundColor": "#000000"
},
  "plugins": {
    "SplashScreen": {
      "launchShowDuration": 5000,
      "launchAutoHide": true
    }
  },
  "cordova": {}
}

[!] CocoaPods could not find compatible versions for pod "CapacitorLocalNotifications"

Capacitor 3 : Blank screen - CreateEvent

iOS minimum version configuration

$
0
0

Here’s what I ended up with in case someone else might find it useful. I also included Android.

OS Versions

Changing iOS Minimum Supported Version

  • In capacitor.config.json, update ios.minVersion. (You can learn a little more about the setting here.)
  • Run npx cap copy to update the copies of capacitor.config.json in the native projects.
  • (The following steps are documented in less detail in official Capacitor upgrade documentation.)
  • Open the project in Xcode (npx cap open ios).
    • In the project navigator/file explorer, click on the App project (has the Xcode project logo).
      • In the App.xcodeproj properties, change the project/target to the App Project if it’s not already selected (the logo is the Xcode project logo–not the app logo).
      • Click the Build Settings tab.
      • Under the Deployment section, update iOS Deployment Target.
      • Repeat the preceeding steps after changing the project/target to the App Target (the logo is the app logo–not the Xcode project logo).
    • These modifications should have resulted in 4 changes to ios/App/App.xcodeproj/project.pbxproj.
  • In ios/App/Podfile, update platform :ios, '<version>'.

Changing Android Minimum and Target Supported Versions

See this article to map between Android OS and Android SDK versions.

See this article if you want to learn more about the version variables we will update.

  • (The following steps are basically documented in official Capacitor upgrade documentation.)
  • In android/variables.gradle,
    • To set the minimum supported Android OS/SDK version, update minSdkVersion.
    • To set the target supported Android OS/SDK version, update compileSdkVersion and targetSdkVersion. They should be the same value.

Ionic 4 – Keyboard scroll view when ion-input is focused

How can I make a timer?

$
0
0

google will have the answers you seek.

Bottom drawer (Cupertino Pane)

Ionic 4 ion-textarea autoGrow does not display properly with ngModel?

$
0
0

You can try something like this as well.

<ion-textarea #textAres rows="4" (ionFocus)="textAres.autoGrow=true" [(ngModel)]="value" ></ion-textarea>

Z-index not working on iPhone

$
0
0

Hi @hanaa, did you find a solution?

I’ve been struggling with the same problem for weeks.

It is something related with the viewport height but I cant get it working

Amtrak’s Ionic app ranks as one of the safest apps to use

$
0
0

Originally published at: Amtrak’s Ionic app ranks as one of the safest apps to use - Ionic Blog

As of December 2020, Apple has required all apps in the App Store to report their data collection practices. Once added by developers, users can view the app’s product page to see which data is linked to them or used to track them. A recent report from the secure storage service pCloud highlighted the “most…

HTTP ERROR Response on device

$
0
0

Hola, tengo en este momento el mismo problema, tu como lo resolviste?


Crypto.subtle

$
0
0

I need to encrypt and decrypt data in my app and I am using crypto.subtle for that. This feature is only available in a secure context (i.e. https) so what does that mean for Capacitor apps?

From my tests, it seems to not be working so is there any settings or configuration values that I need to enable to get this working?

Thanks

Crypto.subtle

$
0
0

More detail on what “your tests” constitute and what you define as “not working” would be extremely helpful to anybody attempting to assist your cause.

I haven’t dealt with this issue in a couple of years, so things may have changed, but one potential pitfall that used to be a concern is that the Promises that crypto.subtle returns are not zone-aware, so if you are trying to use them in an Angular app (I have no idea how other frameworks handle this), you need to zonify them.

The method that I settled on as being most futureproof (i.e. “does not rely explicitly on zone.js being present”) is to simply wrap them inside a Promise.resolve in your code. See here for an example.

Ionic --Prod Mode. error blank screen and Cannot find module "." Only with (Cordova run android --prod)

$
0
0

Hello I am facing the same issue with blank white screen for --prod build but do not understand how you determine which versions of @ionic/app-scripts and typescript to use in the package.json. For example how did you figure out to use 3.1.9 and ~2.6.2 to fix your specific build?

Language Lab App - but "not a function" error

$
0
0

Told my missus I could quickly write her a language lab app because she cant find what she wants - hear a sentence read out, record yourself and listen to yourself to check pronunciation.

I’ve started with the “list” template. It displays a list of messages - you click and get a new screen with teh message.

For my app the messages are the sentences, you click and get a screen with the sentence, and play buttons. From the “list” template this is the “view-message” module.

Here is html - I’ve just added some icons for play, record etc, Play at the moment

<ion-header [translucent]="true">
  <ion-toolbar>
    <ion-buttons>
      <ion-back-button [text]="getBackButtonText()" defaultHref="/"></ion-back-button>
    </ion-buttons>
  </ion-toolbar>
</ion-header>
<!-- If A file name is clicked it goes here - do we need this?-->
<!--ion-content [fullscreen]="true" *ngIf="message"-->
  <ion-content *ngIf="message">
  <ion-item>
    <ion-icon name="person-circle" color="primary"></ion-icon>

  </ion-item><ion-item> {{message.englishText}}
        
          </ion-item>
  <ion-item> {{ message.pinyinChinese}}</ion-item>
          <ion-item>{{ message.simplifiedChinese}}</ion-item>  
           <ion-item> <ion-icon name="play" (click)='errMsg()'></ion-icon>Play the file</ion-item>
           <ion-item><ion-icon name="mic"></ion-icon>Record yourself</ion-item>
           <ion-item> <ion-icon name="play"></ion-icon>Play yourself back</ion-item>
</ion-content>

Here is the .ts file

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { ViewMessagePage } from './view-message.page';
import { IonicModule } from '@ionic/angular';
import { ViewMessagePageRoutingModule } from './view-message-routing.module';
import { NativeAudio } from '@ionic-native/native-audio/ngx';
@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
    ViewMessagePageRoutingModule
  ],
  declarations: [ViewMessagePage]
})
export class ViewMessagePageModule {

  constructor(private nativeAudio: NativeAudio) {  }
  
  playXino(){
    this.nativeAudio.preloadSimple( 'click', 'assets/1.mp3');
    this.nativeAudio.play('uniqueId1', () => console.log('uniqueId1 is done playing'));   
  }
errMsg() {
   console.log('why is this not a function?');
}
  }

All I’m doing at the moment is clicking the play button to run errMsg(). But it tells me ctx_r1.errMsg is not a function. Can anyone help me see why this is not a function?

Getting Storagerelay URI is not allowed for 'NATIVE_ANDROID' client type

$
0
0

Hi Team,

I am calling the gmail api functions “send email” “Inbox” list,
I created OAuth in google console platform using “Application Type” is Android

When i call gapi.auth2.authorize, i am getting below error

Error 400: invalid_request

Storagerelay URI is not allowed for ‘NATIVE_ANDROID’ client type.

How to resolve this error?

Thanks in Advance

Ramji

Viewing all 230719 articles
Browse latest View live


Latest Images

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