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

Ion-radio buttons not selecting

$
0
0

I’m familiar with FormControls and that seems like overkill for a simple Radio Button selection.

Only reason paymentChosen() doesn’t take any arguments was to first determine from where it would fire. After determining that, I would pass in the value from a radio option.

Within this same paymentChosen() function I’d call some service with the value passed from the radio list.

Is this ^ not possible with my approach of ionSelect?


Tab icons not showing

Ion-radio buttons not selecting

$
0
0

I wouldn’t say it’s not possible, but it’s unusual and I would at least think carefully about how the principle of least surprise factors in here.

Typically, radio buttons aren’t drivers of action. One can click back and forth selecting and deselecting radio buttons, and all that really happens is that the selected item changes. There is usually a separate driver of action (like a submit button) that does something with whatever the selected radio is at the time the form is submitted. It sounds from your description that the “call some service” should be triggered not by the radio group, but by a submit button, in which case all this is mooted.

If, after contemplation, you insist that whatever paymentChosen is doing needs to be done whenever a radio selection is made, even if that choice hasn’t yet been made final with a submission action, I still think FormControl offers a cleaner way of doing that, because you can simply listen to its valueChanges instead of doing anything in the template.

Ion-radio buttons not selecting

$
0
0

Alright, I’ll take your advice and only use NgModel to update the values dependent on the user choice. I won’t submit an action if a user clicks on a radio option.

So ionSelect doesn’t work? :upside_down_face:

Local notificação com scheduler no ionic 4 não funciona no sdk 28+ quando usa o trigger

$
0
0

0

Funciona

 this.localNotifications.schedule({
      id: 1,
      summary: "Amanhã  3444" ,
      text: 'teste local notification ',
      smallIcon: "res://icone_in",

      title: "aaaa 3",

      led: 'FF0000',
      sound: null
   });

não funciona

 this.localNotifications.schedule({
      id: 1,
      summary: "Amanhã  3444" ,
      text: 'teste local notification ',
      smallIcon: "res://icone_in",

      title: "aaaa 3",
      trigger: {at: new Date(new Date().getTime() + 10000)},
      led: 'FF0000',
      sound: null
   });

estou usando

 import { LocalNotifications } from '@ionic-native/local-notifications/';

se usar o trigger sem adicionar tempo funciona tb não sei que fazer obrigado

ILocalNotification "trigger at" not working?

Ionic v5 and react i18n

$
0
0

Hi everyone!
I’m trying to learn how to make an app with Ionic v5 and react.
I’m facing a lot of differences between react and angular (language where I come from) as expected but I’m able to find out how to do everything more or less.

There’s couple thing that i’m not able to understand like for example: why it seems very difficult to find an easy to use libraries to face common “tasks” like i18n.

Which library are you comfortable to use to make your app multilanguage?

Thanks in advance!

Designing a Landing Page with a Video Background in Ionic 4


Ionic 4: Log in as a different user, previous user's data still shows

$
0
0

My Ionic 4 app uses Firebase to authenticate, and data is stored in local storage after logging. Here’s the flow:

  • User A logs in
  • User A’s info is retrieved from Firebase, then stored locally in storage
  • User A logs out, and his info is cleared from storage by calling storage.clear()
  • User B logs in, but can still see User A’s info

How can I completely clear a user’s info after logging out, so that it doesn’t show when another user logs in???

The code that reads data from the storage to display is in the ngOnInit() function. I noticed that when logging in again as a different user, ngOnInit() isn’t called, so could that be why it’s not showing the new user’s data?

Trying to update AndroidManifest.xml to stop GPS being required

$
0
0

I have now resolved this a different way using a hook script as follows, I am sure there is probably a nicer way of doing this if anyone has any suggestions or improvements to my script?

In my config.xml I added the following within the “Android” platform:

<platform name="android">
   .....
   <hook src="scripts/set-gps-not-required.js" type="after_prepare" />
   .....
</platform>

I then created a folder in the root of my project called “scripts” and added the following file named “set-gps-not-required.js”:

#!/usr/bin/env node

module.exports = function(context) {

  var fs = require('fs'),
      path = require('path');

  var platformRoot = path.join(context.opts.projectRoot, 'platforms/android');
  var manifestFile = path.join(platformRoot, 'app/src/main/AndroidManifest.xml');

  console.log("Platform ROOT: " + platformRoot);
  console.log("Manifest file: " + manifestFile);

  // If manifest file exists
  if (fs.existsSync(manifestFile)) {
    console.log("Manifest file exists");

    // Read manifest file
    fs.readFile(manifestFile, 'utf8', function (err, data) {
      if (err) {
        throw new Error('Unable to find AndroidManifest.xml: ' + err);
      }

      // Remove any current GPS settings
      data = data.replace(/<uses-feature android:name="android.hardware.location.gps" \/>/g, '');
      data = data.replace(/<uses-feature android:name="android.hardware.location.gps" android:required="false" \/>/g, '');

      // Add GPS uses-feature (setting to required false)
      data = data.replace("</manifest>", 
        '\t<uses-feature android:name="android.hardware.location.gps" android:required="false" \/>\n</manifest>');

      // Replace manifest file with updated version
      if(data){
        fs.writeFile(manifestFile, data, 'utf8', function (err) {
          if (err) throw new Error('Unable to write AndroidManifest.xml: ' + err);
        })
      }
    });
  } else {
    console.log("Manifest file DOES NOT exist");
  }
};

Why when creating an Ionic Angular project with Capacitor, the angular.json file is not created?

$
0
0

I created a new project ionic start "Super App" sidemenu --capacitor --type=ionic-angular and went to configure the types and environments, but as there was no angular.json, I copied it from another project, changing the necessary one.

This is confusing, because when creating with Cordova it is present.

Failed to load resource: net::ERR_FILE_NOT_FOUND for all paths in index.html on Android build

$
0
0

Have you add mipmap folder and put icon.png to it in platform>android>app>src>main folders?it’s work for me.

Blank project gives white screen with capacitor

$
0
0

I just started a new blank angular based Ionic app out of curiosity.

I used the command below: ionic start blanktest blank --type=angular

During the install process the tool asks me if i want to install Capacitor too. If i say no than let the install finish i can run: ionic cordova emulate ios This command will add the IOS platform than build the blank starter app and open it in an ios emulator.

If I start another install with the same method and different app name and i install Capacitor too, the following happens:

Ionic installs the blank project successfully.Than i run: ionic capacitor run ios Which adds the ios platform and opens up the xcode. From there if i hit the emulate button it compiles without any error, the emulator starts but after the splash screen with the capacitor logo i only see white screen. No errors or anything in the console. I’m still using the unmodified blank codebase from ionic start.

Why is this happenin?

Blank project gives white screen with capacitor

$
0
0

I’ve just run into the same issue. I’m battling to get an existing project working with the whitescreen issue, so I thought i’d start a new project and test adding plugins one by one, but a blank ‘tabs’ project does not work. Runs fine in browser, but on ios just loads a blank white screen.

I’m trying to run on iPhone SE 2nd Gen emulator, but have also tried running on my iPhone 8 on iOS 13.4.1
No errors in web inspector.

I can’t find any errors that would be causing this.

XCode logs from emulator show:

2020-06-03 01:14:05.823267+0200 App[27088:1573333] WF: === Starting WebFilter logging for process App

2020-06-03 01:14:05.823933+0200 App[27088:1573333] WF: _userSettingsForUser : (null)

2020-06-03 01:14:05.824307+0200 App[27088:1573333] WF: _WebFilterIsActive returning: NO

Loading network plugin

2020-06-03 01:14:05.999428+0200 App[27088:1573333] CAPKeyboard: resize mode - native

:zap: Loading app at capacitor://localhost…

Reachable via WiFi

APP ACTIVE

:zap: WebView loaded`


XCode logs from iPhone 8:

2020-06-03 01:28:24.675782+0200 App[30530:8658073] WF: === Starting WebFilter logging for process App

2020-06-03 01:28:24.675836+0200 App[30530:8658073] WF: _userSettingsForUser mobile: {

filterBlacklist = (

);

filterWhitelist = (

);

restrictWeb = 1;

useContentFilter = 0;

useContentFilterOverrides = 0;

whitelistEnabled = 0;

}

2020-06-03 01:28:24.675869+0200 App[30530:8658073] WF: _WebFilterIsActive returning: NO

Loading network plugin

2020-06-03 01:28:24.790863+0200 App[30530:8658073] CAPKeyboard: resize mode - native

:zap: Loading app at capacitor://localhost…

Reachable via WiFi

APP ACTIVE

:zap: WebView loaded

2020-06-03 01:28:27.491126+0200 App[30530:8658073] Received memory pressure event 4 vm pressure 1

Received memory pressure event 4 vm pressure 1

Why when creating an Ionic Angular project with Capacitor, the angular.json file is not created?

$
0
0

Is there a compelling reason you’re using type ionic-angular and not angular?


incorrect image orientation

$
0
0

I have a problem with image, the image after taken appears with the wrong orientation running on android, and when saving in the db saves wrong too, the documentation has nothing about it, can someone help me? I’m using ionic 5.4.16, angular 5.0.0 and angular / cli 8.3.26

Select box flickers when blurring input field, with attached model (ANDROID)

$
0
0

@heezo Are you able to manage this issue, i am having the same issue now

Getting CORS error in getting response from an api

Apple Music Kit JS

$
0
0

You are advised to use the Audio Converter for Windows from DRmare to download Apple Music songs. Then you can listen to them on your apps offline. The lossless music is easy to save and you can play the songs on your own players.

Migration 3x to 4x

$
0
0

Hi,

I want to migrate a ionic 3x app to ionic 4x, Does anyone know if I should migrate directly to 5x or should I migrate to 4x first?

Thanks

Viewing all 231634 articles
Browse latest View live


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