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

Capacitor sync cb.apply is not a function

$
0
0

Glad you got it worked out. btw you might wanna updgrade those capacitor plugins as well may, cause other unintended issues while upgrading:


FCM push notifications app badge

$
0
0

Hey thanks for your reply. That’s good to know the plugin isn’t deprecated. I figured out the problem and where they moved the badge property on the Firebase Admin SDK. In case anyone else facing the same issue; it has moved from notification > badge on the message object to apns > payload > aps > badge.

Ionic6 ,On some Android phones, in the browser, open the page, click on the time in the on ion-datetime-button, and whether it is clicking on the hour or minute, it will jump up one by one until it shows 00. I don't know why

$
0
0

On some Android phones, in the browser, open the page, click on the time in the on ion-datetime-button, and whether it is clicking on the hour or minute, it will jump up one by one until it shows 00. I don’t know why
code:
```

    <ion-label floating>End Date</ion-label>
    <ion-datetime-button datetime="datetime2" ></ion-datetime-button>

    <ion-modal [keepContentsMounted]="true">
      <ng-template>
        <ion-datetime id="datetime2" formControlName="EndDate" (ionChange)="onDateChange($event)"></ion-datetime>
      </ng-template>
    </ion-modal>

Introducing: Capacitor Barcode Scanner Plugin

$
0
0

When npx cap run android, I encounter the following error

Introducing: Capacitor Barcode Scanner Plugin

Google SignIn on Android, error Code 10

$
0
0

I integrated Google Oauth Sign In in my Ionic Capacitor App but I have an issue for Android Device only:

When the user clicks on the Google login button from the app, a popup appears to select the gmail account. Immediately afterwards the system goes into error and in the log I find this error:

{
	"save": false,
	"callbackId": "21517523",
	"pluginId": "GoogleAuth",
	"methodName": "signIn",
	"success": false,
	"error": {
		"message": "Something went wrong",
		"code": "10"
	}
}

I’ve read several posts and tried different solutions but I can’t resolve the problem. I followed the following steps

  1. I deleted all fingerprints from Firebase Console for Android application

  2. I have deleted all references from Google Cloud Console Oauth 2.0 Client IDs for the Android application

  3. Generated SHA certificate fingerprint using windows shell command

keytool -keystore my-jks-file-path -list -v

Certificate fingerprints:
         SHA1: 56:5D:38:F2:D0:XX:XX:XX:XX:XX:D7:FB:56:7A:A2:D4:B5:1B:D0:C5
  1. Add SHA certificate fingerprint from Firebase Console (Android Apps)

  2. Google creae automatically reference into Google Cloud Console Oauth 2.0 Client IDs (Android client for (auto created by Google Service))

  3. Downloaded google-services.json file-path

  4. Copied google-services.json file into my ionic app into .\android\app\google-services.json

  5. Rebuild App using keystore (the same used for generate SHA certificate fingerprints )

  6. Installed on my android device

Please help me.
Thanks

iOS not updated on build

$
0
0

For me the way I built the app was crucial. As Josh Morony pointed out here.

If you update something in the code after that you have run the app via XCode on your phone or the simulator, and you want to see the change, you have to build first:

Using Ionic CLI:
ionic build

Using Vite:
npm run build
(npx cap build ios did not work for me)

Then:
ion cap copy ios
ion cap run ios

Button component with "aria-labelledby" attribute not working correctly

$
0
0

Hello,
I have a question about the “ion-button” component. When I use the button with the “aria-labelledby” attribute and link it to an HTML element with a specific “id” acting as the button’s label, the screen reader does not read the content of the HTML element.

I think it’s because of the shadow DOM, that the inner button used inside the “ion-button” just cannot see the HTML element next to the “ion-button”.

So my question is, if it has some solution how to make this work?

This is the code snippet which I tried:

 <ion-content class="ion-padding">
      <p id="btn-label">Button Label</p>
      <ion-button aria-labelledby="btn-label">Default</ion-button>
      <button aria-labelledby="btn-label">Native Button</button>
 </ion-content>

or directly link to the showcase: https://stackblitz.com/edit/kq5xbb?file=index.html

As you can see, I implemented the native button HTML element to demonstrate, that the native button announces the label correctly.


ESLint not working with Ionic React 8 TypeScript project

$
0
0

I have a Ionic React 8 TypeScript project generated using the Ionic CLI. But executing npx eslint results in no warnings / errors. What am I missing?

Android Debug Bridge(adb) issue

$
0
0

All good now? Or do you still need help?

ESLint not working with Ionic React 8 TypeScript project

$
0
0

Maybe it doesn’t have any warnings or errors? if you just created the app it shouldn’t throw any warnings.

Have you tried adding some code that would cause warnings?

ESLint not working with Ionic React 8 TypeScript project

$
0
0

Did you configure eslint/tslint and the plugins you want to use?

Nfc integearation in ionic react capacitor porject

$
0
0

@ashokmanjhu Did you find any solution? I am struggling with the same problem nfc integration in ionic react capacitor. Thanks

How to avoid flicker with ion-tabs and isVisible state?

$
0
0

If you dont mind. Can you show you full React Router to handle authentication. I got same issue flicking.

Nfc integearation in ionic react capacitor porject

$
0
0

Yes , Later on contacted to the capawesome-team and purchased their capacitor to use it and it worked perfectly without any issues.


Nfc integearation in ionic react capacitor porject

$
0
0

Aren’t there any free options? how much should we pay ? is it one time purchase or monthly subscription?

Nfc integearation in ionic react capacitor porject

$
0
0

Currently there is no free option. $15 for personal use or $50 for professional use . It is a monthly subscription.
Link - Insiders - Capawesome

Ionic 7 - Mask on a ion-input

$
0
0

Maskito looks good, but it’s russian product. Is there any alternative?

Any way to share a image through Capacitor/Share without saving to the users device?

$
0
0

Great question :slightly_smiling_face:, will get there soon :sweat_smile:

Have you tried with a data URL?

const url = 'data:image/jpeg;base64,' + base64encodedImage

Or did you find another solution in the mean time?

Show multi-page PDF inline with iOS native viewer?

$
0
0

Working proof-of-concept using Mozilla’s (non-native) PDFjs (with Svelte) in CapacitorJS:

	import { getDocument } from 'pdfjs-dist';
	// next line needed for pdfjs-dist to run
	import { WorkerMessageHandler } from 'pdfjs-dist/build/pdf.worker.mjs';

	export let base64Pdf;
	let scale = 1.5;
	let pdfContainer;
	let errorMessage = '';

	try {
		pdfContainer.innerHTML = '';
		const loadingTask = getDocument({ data: atob(base64Pdf) });
		const pdfDocument = await loadingTask.promise;

		for (let pageNum = 1; pageNum <= pdfDocument.numPages; pageNum++) {
			const page = await pdfDocument.getPage(pageNum);
			const viewport = page.getViewport({ scale });

			const canvas = document.createElement('canvas');
			const context = canvas.getContext('2d');
			canvas.height = viewport.height;
			canvas.width = viewport.width;

			const renderContext = {
				canvasContext: context,
				viewport: viewport
			};
			await page.render(renderContext).promise;
			pdfContainer.appendChild(canvas);					

			// add a spacer between pages
			const wrapper = document.createElement('div');
			wrapper.style.backgroundColor = 'grey';
			wrapper.style.padding = '10px';
			pdfContainer.appendChild(wrapper);
		}			
	} catch (err) {
		errorMessage = err.message;
	}

And printing is possible via HTML, too:

	import { Printer } from '@bcyesil/capacitor-plugin-printer';

	const dataUrl = canvas.toDataURL(); // Convert canvas to data URL
	htmlString += `<img src="${dataUrl}" width="${canvas.width}" height="${canvas.height}" />`; 

    Printer.print({ content: htmlString }) }

It’s not native, but it works, therefore will set to resolved.

Viewing all 230471 articles
Browse latest View live


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