Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 71531 articles
Browse latest View live

To handle the case where a user changes notification settings from outside the app (e.g., enabling notifications from device settings)

$
0
0

to handle the case where a user changes notification settings from outside the app (e.g., enabling notifications from device settings).
then how to generate token and how to call functions to check token is there or not , if not how will create and after create how to send token to API without any user Interface.

Or any other possibility to handle this case ?

1 post - 1 participant

Read full topic


Building Modern Angular Apps with Ionic and Standalone Components

ScreenOrientation plugin - OrientationLockType enum type missing

$
0
0

On Typescript 5.2+ the ScreenOrientation plugin currently generates an error due to the OrientationLockType missing in Typescript’s lib.dom.d.ts. This is due to Firefox removing the enum, meaning it fell below Typescript’s two browser threshold for including it.

There is a patch for Capacitor which is hopefully going to be in the next release: fix(screen-orientation): Add OrientationLockType by dtarnawsky · Pull Request #1914 · ionic-team/capacitor-plugins · GitHub

In the meantime, the following seems to work while waiting for the patch to be released (if someone has a better way than this, please feel free to comment!):

Create definitions.d.ts in src directory with the following:

declare type OrientationLockType = 'any' | 'natural' | 'landscape' | 'portrait' | 'portrait-primary' | 'portrait-secondary' | 'landscape-primary' | 'landscape-secondary';

1 post - 1 participant

Read full topic

"ionic cap run android --livereload --external" not working

$
0
0

Here is the error:

capacitor.cmd run android --no-sync --target ZY22H2NXDQ
[capacitor] × Running Gradle build - failed!
[capacitor] [error]
[capacitor] ERROR: JAVA_HOME is not set and no ‘java’ command could be found in your PATH.
[capacitor]
[capacitor] Please set the JAVA_HOME variable in your environment to match the
[capacitor] location of your Java installation.
[capacitor]
[ERROR] An error occurred while running subprocess capacitor…

My JAVA_HOME var is set to: C:\Program Files (x86)\Common Files\Oracle\Java\javapath

Any ideas what is causing this error? Or how to troubleshoot it?
Thanks.

1 post - 1 participant

Read full topic

How to use with vue-i18n-routing

Old app that needs an update

$
0
0

Hi all, I have an old app, build on ionic 2.5.2 and need to make changes to it as it does not run on the most recent android os-es. I am not the developer of the app, but can grant access to the source code. Would anybody want to look at the code and give me a quote for making the changes necessary? The code resides on GitLab in a private repo.

The app is in the Goole Play store:

2 posts - 2 participants

Read full topic

How to patch a Capacitor plugin - Capawesome

I'am having problem with initializing firebase in my projet

$
0
0

As soon as i add this code to my app.module provideFirebaseApp(() => initializeApp(environment.firebaseConfig) ), to initialize firebase i get this error on my browser

Error: NG0203: inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with runInInjectionContext

1 post - 1 participant

Read full topic


Suddenly My website is not running correctly in my phone

$
0
0

Suddenly mine website that i made with ionic react v7 is not working correctly in my phone chrome browser but it is running fine on other devices and mine internet browser also. My chrome is updated but i didn’t know why it is showing like this behaviour. There is some issues like repeatition of content.
See below image

1 post - 1 participant

Read full topic

Index.html is not rendering in ios devices instead shown source code why?

$
0
0

I have a package which contains index.html
And i am launching index.html using inappbrowser portnumber 9000.
But it shows source code instead rendering… Anyone pls help to render

  let websiteDir = `${this.file.dataDirectory}${'demo/'}${packageName}/`;
 this.httpd.startServer({
        www_root: websiteDir.substring(7),
        port: 8200,
        localhost_only: true,
      })

this.inappBrowser = this.iab.create(url, “_blank”, inAppBrowserOptionsList);

1 post - 1 participant

Read full topic

Content hidden by bottom navigation bar(such as the back, home, and recent apps buttons) in android website

$
0
0

Some content of my website like see the bottom of image below.
there is an Blue color Fab Icon at bottom end corner of the app most part is hidden with navigation bar.
also the last announcement ‘S’ is not full its content is also hidden under navigation bar.

i can fix this easily by adding css

IonSplitPane{
margin-bottom: 55px;
}

But i think it is a bad practice. it might not worked for some phone because of no navigation buttons like Iphone or gesture back buttons.

Please provide a better approach

1 post - 1 participant

Read full topic

Ionic -v6 - user select not working in ion-accordion

$
0
0

style user-select not working in accordion.

<ion-accordion-group style="user-select: auto">
 <ion-accordion value="first" style="user-select: auto">
   <ion-item slot="header" color="light">
     <ion-label>First Accordion</ion-label>
    
   </ion-item>
   <div class="ion-padding" slot="content" style="user-select: auto">First Content
     <p style="user-select: auto;"> hello </p>
   </div>
 </ion-accordion>
 <ion-accordion value="second">
   <ion-item slot="header" color="light">
     <ion-label>Second Accordion</ion-label>
   </ion-item>
   <div class="ion-padding" slot="content">Second Content</div>
 </ion-accordion>
 <ion-accordion value="third">
   <ion-item slot="header" color="light">
     <ion-label>Third Accordion</ion-label>
   </ion-item>
   <div class="ion-padding" slot="content">Third Content</div>
 </ion-accordion>
</ion-accordion-group>

1 post - 1 participant

Read full topic

Alert controller works in browser but not in android

$
0
0

It works fine on my Edge browser except for Android. I tried using Chrome inspect, but no errors were shown. Except it only calls the pre-call in the console and remains stuck at alert.create.

As you may have noticed, it’s straightforward. I don’t know if I still have something to implement for this to work on Android or do I have to disable something for it to work.

Versions
Mobile Chrome Version: 119.0.6045.66
Desktop Edge Version: 120.0.2210.77
Ionic: 7
Android 13

async alertAccountHoldersOnly(){
    console.log("pre call");
    const alert = await this.alert.create({
        header: 'Subscribe Now',
        subHeader: 'short notice',
        message: 'message here',
        buttons: ['Cancel',{
            text: 'OK',
            handler: () => {
                this.router.navigate(['/signin']);
            }
        }]
    });
  
    await alert.present();
    console.log("post call");
}
<ion-button fill="clear" (click)="alertAccountHoldersOnly()">sample</ion-button>

1 post - 1 participant

Read full topic

Where to change the Bundle ID or how to make it autoincrement

$
0
0

Hello

I am try to deploy an App for second time and I get this error

The provided entity includes an attribute with a value that has already been used The bundle version must be higher than the previously uploaded version: ‘1’

Where can I change the Bundle version or how can I make it autoincrement?

Thanks

1 post - 1 participant

Read full topic

Ion-infinite-scroll with unwanted infinite scroll events

$
0
0

Hi, I use ion-infinite-scroll as in the first example on this page

But I have set the position to top.

<ion-content role="feed">
  <ion-infinite-scroll position="top" (ionInfinite)="loadMoreData($event)">
    <ion-infinite-scroll-content loadingText="Loading more Data..." loadingSpinner="bubbles"></ion-infinite-scroll-content>
  </ion-infinite-scroll>
   <ion-list>
    <app-data *ngFor="let data of datas" [data]="data"></app-data>
  </ion-list>
</ion-content>

Since I would like to have the scrollbars at the end of the list after inserting the data, I call scrollToBottem.

  scrollToBottom() {

    setTimeout(() => {
      if(this.content !== undefined) {
        this.content.scrollToBottom(300);
      }
    }, 500);

    setTimeout(() => {
      this.initload_ready = true;
    }, 1500);
     
  }

Unfortunately, this call triggers an infinite scroll event! To block this event at the beginning, I have to trick with a variable (initload_ready).

  loadMoreData(event: InfiniteScrollCustomEvent) {
    if (!this.initload_ready) {
      this.completeScrollEvent(event);
      return; 
    }
   [...]
}

I think that with position = top no infinite scroll event should be triggered with a down scrolling. Seems that it triggers an event when there is a movement in the trigger zone without differentiating the direction.

What is also not quite optimal is that there is a position in the trigger zone (PWA on desktop) where infinite scroll events are triggered until event.target.complete() is called. That’s why I have to limit the number of items and call “event.target.disabled = true” so that not all data records are loaded automatically into the array.

Is there anything in the code that I can do better?

1 post - 1 participant

Read full topic


[NSURLSession sharedSession] may not be invalidated - message on ios

$
0
0

Not sure if this is an issue or not, but on iOS whenever my app makes an HTTP request the following message is shown in the iOS log:

[NSURLSession sharedSession] may not be invalidated

The request seems to work OK, but it doesn’t seem right to have this message each time.

I’m using ‘fetch’ to make the HTTP request, with the following capacitor config:

import { CapacitorConfig } from '@capacitor/cli';

const config: CapacitorConfig = {
  appId: 'io.ionic.starter',
  appName: 'http-nsurlsession-error',
  webDir: 'www',
  server: {
    androidScheme: 'https'
  },
  "plugins": {
    "CapacitorHttp": {
      "enabled": true
    },
    "CapacitorCookies": {
      "enabled": true,
    }
  }
};

export default config;

1 post - 1 participant

Read full topic

State not accessible in appStateChange-listener callback

Capacitor 6 Beta Now Available

When deploying to any hosting service, ionic components and styles don't seem to be recognized

$
0
0

When I run ionic serve locally, the web app looks great but when I try to host it on any platform such as vercel or netlify, the ionic components and styles seem to be unapplied and the web app now looks like a complete mess.

I’ve set the install command to: npm install -g @ionic/cli && npm install

And I’ve set the build command to: ionic build --prod

And the build directory is dist

Yet the problem is still occurring and I don’t know what’s causing the issue specifically.

1 post - 1 participant

Read full topic

What is MDM Solution

$
0
0

Mobile Device Management is a solution that helps organizations manage and secure mobile devices used by their employees. It allows IT administrators to control and monitor mobile devices, such as smartphones and tablets, remotely.

MDM solutions offer a range of features, including:

Device Enrollment: Streamlining the process of adding new devices to the network.

Configuration Management: Setting up and managing device settings, such as email configuration, Wi-Fi settings, and security policies.

Security Management: Implementing security measures like password requirements, encryption, and remote data wipe in case a device is lost or stolen.

App Management: Controlling the installation, updates, and removal of applications on mobile devices.

Monitoring and Reporting: Keeping track of device usage, and performance, and generating reports for analysis.

Remote Troubleshooting: Diagnosing and resolving issues on mobile devices without physical access.

Compliance Monitoring: Ensuring that devices adhere to organizational policies and security standards.

Also Explore: android single app mode || mdm emm uem || EMM pricing || lockdown android tablet for business

1 post - 1 participant

Read full topic

Viewing all 71531 articles
Browse latest View live


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