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

Capacitor Angular Router-Outlet Activate Event Emitter Issue

$
0
0

I’m using Angular v12 and Capacitor v3 without Ionic. I’m trying to get the name of the active parent component. I’m using this code in the app.component.html:

<router-outlet (activate)="onActivate($event)"></router-outlet>

Then, in the app.component.ts I’m using the onActivate function like this:

onActivate(event: any) {
    alert(event.constructor.name);
}

In a web browser it alerts correctly with the active component name, but in an emulator or on my cell it alerts the letter e.

When I alerted event.constructor on my cell it shows the class name is ‘e’ and not the component name.

Is there a way of using Angular and Capacitor without Ionic to get the name of the active component?

Thanks for reading!

1 post - 1 participant

Read full topic


Capacitor Bluetooth LE not connecting cross platform devices

$
0
0

Hi, I am using a Bluetooth LE plugin to connect android and iOS devices via bluetooth. Similar platform OS’s(iOS to iOS and Android to Android) can establish connection successfully. However, when trying to connect iOS to Android or Android to iOS, the state of the device remains disconnected and not able to establish the connection.

I have tried with all the below plugins.

1 post - 1 participant

Read full topic

Build issue when Youtube Video Player Plugin is added in a newly created ionic capacitor project

$
0
0

I created a new ionic capacitor project and installed the Youtube Video Player plugin using the capacitor commands
→ npm install cordova-plugin-youtube-video-player
→ npm install @awesome-cordova-plugins/youtube-video-player
→ ionic cap sync

after the below command, the Android Studio opens
→ ionic capacitor build android

While making the apk build from the Android Studio, it throws this error

ERROR: newproject/android/app/build/intermediates/packaged_manifests/debug/AndroidManifest.xml:52: AAPT: error: resource string/activity_name (aka io.ionic.starter:string/activity_name) not found.

But without adding this plugin, the apk builds.
Need help in figuring this out as i am facing this issue in my original project.

Am sending the ionic info data too for the reference.

Ionic Info:

Ionic CLI : 6.18.2 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.0.11
@angular-devkit/build-angular : 13.2.6
@angular-devkit/schematics : 13.2.6
@angular/cli : 13.2.6
@ionic/angular-toolkit : 6.1.0

Capacitor:

Capacitor CLI : 3.4.3
@capacitor/android : 3.4.3
@capacitor/core : 3.4.3
@capacitor/ios : 3.4.3

Utility:

cordova-res (update available: 0.15.4) : 0.15.3
native-run : 1.5.0

System:

NodeJS : v16.13.1 (/usr/local/bin/node)
npm : 6.14.16
OS : macOS Catalina

1 post - 1 participant

Read full topic

How to increase the height of inappbrowser

$
0
0

My code looks something like below code this.inappbrowser.create(url, "_blank",'fullscreen=yes');

1 post - 1 participant

Read full topic

Ionic v6 - How to offset toast position

$
0
0

Hi,

How do we offset a toast position?

In my particular case, i want to offset toast bottom position to appear a bit higher so that it does not overlap the bottom main menu of the app.
Any ideas?

Thanks.

1 post - 1 participant

Read full topic

Npx cap add ios fails with Gem::MissingSpecError (Solved)

$
0
0

(solved - see below)

I have recently upgraded my project to Capacitor 3 (see package.json below) and it has not worked since.

The project content code itself is (old) Angularjs 1.8

Command npx cap add ios fails with the following output:

✔ Adding native Xcode project in ios in 58.67ms
✔ add in 59.43ms
✔ Copying web assets from public to ios/App/App/public in 322.68ms
✔ Creating capacitor.config.json in ios/App/App in 584.94μs
✔ copy ios in 340.25ms
✔ Updating iOS plugins in 4.64ms
✖ Updating iOS native dependencies with pod install - failed!
✖ update ios - failed!
[error] /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/dependency.rb:311:in
        `to_specs': Could not find 'CFPropertyList' (>= 2.3.3, < 4.0) among 82 total gem(s) (Gem::MissingSpecError)
        Checked in
        'GEM_PATH=/Users/aderowbotham/.rvm/gems/ruby-2.4.3:/Users/aderowbotham/.rvm/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0:/usr/local/Cellar/cocoapods/1.11.2_2/libexec',
        execute `gem env` for more information
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1449:in
        `block in activate_dependencies'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in
        `each'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in
        `activate_dependencies'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1420:in
        `activate'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1452:in
        `block in activate_dependencies'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in
        `each'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in
        `activate_dependencies'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1420:in
        `activate'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:304:in `block in
        activate_bin_path'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:303:in `synchronize'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:303:in
        `activate_bin_path'
        from /usr/local/Cellar/cocoapods/1.11.2_2/libexec/bin/pod:23:in `<main>'

My package.json contains:

  "dependencies": {
    "@capacitor/core": "^3.0.0",
    "@capacitor/ios": "^3.0.0",
    "angular": "^1.8.2",
    "angular-animate": "^1.8.2",
    "angular-hammer": "^2.2.0",
    "angular-local-storage": "^0.7.1",
    "angular-sanitize": "^1.8.2",
    "foundation-icon-fonts": "^0.1.1",
    "foundation-sites": "^6.6.3",
    "hammerjs": "^2.0.8",
    "what-input": "^5.2.7"
  },

My system is:

  • macOS Monterey 12.2.1
  • Intel Processor (so no Rosetta)
  • XCode 13.3
  • Ruby 2.6

Is this a Ruby problem and what can I do to fix it?

2 posts - 1 participant

Read full topic

Ionic 6 + Angular 13, may I switch to RxJS 7.x?

$
0
0

I successfully migrated from Ionic 5 to Ionic 6 and from Angular 12 to Angular 13, may I switch to RxJS 7.x or Ionic is internally tied to RxJS 6.x?

1 post - 1 participant

Read full topic

Audio Transcription


Disable IonRouterOutlet Component Caching

$
0
0

Hi!

I am using Ionic vue and ionic vue router in version 6.0.x.
I noticed, that the IonRouterOutlet component is caching visited pages.

This looks like a nice feature in the first place. And it will be useful in most of the cases to improve app performance and save server requests.

But in some cases I want to force to re-render the page (component) every time when I come back later to that page. I did not find any way to disable caching / keep alived components. It would be just fine to destroy the component when leaving the component / page.

How can I reach this?

1 post - 1 participant

Read full topic

Turn off vibration in ion-reorder

$
0
0

My device vibrates when I drag list items in Ionic Framework. Is there any way to turn off that vibration?

1 post - 1 participant

Read full topic

Share state across tabs with context, but without unnecessary redraws?

$
0
0

Kind of a general question. How do you share state between tabs? I’ve used context wrapping the whole router that contains state for all components that share state between pages. (Think user interacetion on tab1 affects components on both tab1 and tab2).

The problem with this is that it redraws all components on the page even though they are not using the shared state. This is because the context wraps the whole page. I need to wrap the whole router including all the pages with context because the context is shared.

I tried using this solution: How to Dispatch an Action to Update a Sibling in React | by Fang Jin | JavaScript in Plain English
But this requires that the components be pre-drawn which gets really messy.

Any ideas?

1 post - 1 participant

Read full topic

@awesome-cordova-plugins/background-geolocation android-permissions error

$
0
0

I am getting error in Ionic 6 in awesome-cordova-plugins/background-geolocation in android while build.
What went wrong:
Execution failed for task ‘:app:mergeDebugResources’.

Could not resolve all files for configuration ‘:app:debugRuntimeClasspath’.
Could not find com.intentfilter:android-permissions:0.1.7.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/intentfilter/android-permissions/0.1.7/android-permissions-0.1.7.pom
- https://repo.maven.apache.org/maven2/com/intentfilter/android-permissions/0.1.7/android-permissions-0.1.7.pom
Required by:
project :app

1 post - 1 participant

Read full topic

AddEvent error when running application on cell phone

$
0
0

Can you please help me with this error? The amazing thing is that if I generate the apk from a computer with Windows operating system it works without problems but with Ubuntu I get this error.

1 post - 1 participant

Read full topic

Dynamic Angular Form from JSON — How can I implement a Datetime in popover with input?

$
0
0

Hi,

I have problems with my popover, as it only works with the first datatime it finds in the JSON and the second one fails and assigns all date types the same value, I have the following:

  <div *ngIf="field.type === 'date'">
                  <ion-label position="floating">{{ field.label }}</ion-label>
                  <ion-item button="true" id="open-date-input">
                    <ion-label>{{ field.label }}</ion-label>
                    <ion-text slot="end">{{ field.value }}</ion-text>
                    <ion-popover trigger="open-date-input" show-backdrop="false">
                      <ng-template>
                        <ion-datetime
                          #popoverDatetime
                          presentation="date"
                          [formControlName]="field.name"
                          (ionChange)="field.value = formatDate(popoverDatetime.value)"
                        ></ion-datetime>
                      </ng-template>
                    </ion-popover>
                  </ion-item>

                   <!-- I don't like this one as it takes up a lot 
                    of space and that's why I chose the popover -->
                  <!-- <ion-datetime
                    [value]="field.value"
                    [formControlName]="field.name"
                  ></ion-datetime> -->
 </div>

This is in the IONIC documentation [ion-datetime: Ionic API Input for Datetime Format Picker https://ionicframework.com/docs/api/datetime:
image

Thank you

1 post - 1 participant

Read full topic

Capacitor pushnotifications

$
0
0

Whenever I include the components on Vue for pushnotifications doesn’t matter what function I call or where, even checkpermissions() within a method function that doesn’t even get fired my app is requesting permissions on iOS with the default popup.
What I want to do is present my own modal first and then request device permission, but something is causing the plug-in to present the iOS message box before even my modal.

1 post - 1 participant

Read full topic


How I can add quality on video player?

$
0
0

I have links mp4 and I need make the user choose a quality,
Ionic Streaming Media play only with one link.

1 post - 1 participant

Read full topic

Cannot dismiss a modal by clicking the backdrop (ionic 6)

$
0
0

I migrated to ionic 6 recently and now I am unable to dismiss a modal by clicking the backdrop.

I find that the click is being blocked by this one element inside the ion-modal’s shadow DOM:
<div class="modal-shadow" style="opacity: 1;"></div>

In the inspector, I can solve this issue by adding display: none to the element above. However, in practice this wont work because the element isn’t accessible due to it being shadow DOM and not having a “part” property.

Any idea how I can make this work again?

Note:
I made sure that when I created the modal I added backdropDismiss: true. That should not be the problem.

1 post - 1 participant

Read full topic

Preview of v5 shows v6 instead,

Use of parent html elements CSS selector in local SCSS files

$
0
0

Hello,

We would like to use html or body element’s classes, like ios, md, etc… in our local scss files of a page or a component. Is it possible somehow or can we only use them in global.scss or app.scss ?

For example in home.page.scss :
html.ios app-home ion-content.custom-class-1 myelement {
// hack some ios css bug :wink:
}

Thanks for your help

1 post - 1 participant

Read full topic

Best Transcription Services

Viewing all 70612 articles
Browse latest View live


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