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

How to disable long click on WebView text selection in android

$
0
0

I have a hybrid app made with Svelte + capacitor. In the app we are loading digital book and we are showing custom context/tooltip menu on text selection. It is working fine on Web & Desktop apps but not on Android. On Android it is showing android default menu (copy/ paste etc). We need to disable default android text selection menu.

Tried below code

 mWebView.setOnLongClickListener(new View.OnLongClickListener() {
        @Override
        public boolean onLongClick(View v) {
            return true;
            }
        });
        mWebView.setLongClickable(false);

1 post - 1 participant

Read full topic


Ionic 6 Alert Background from Backdrop dont work

$
0
0

Hello Community,

on Web its not a Problem with CSS to change the Backdrop Background opacity or color but in Android the Alert has always no Backdrop why?

1 post - 1 participant

Read full topic

Ionic Scoial Shring Email not work in ios

$
0
0

Hello dear I want to compose email when user click on email button and use social sharing it is work in android perfectly but in ios there is a problem and give me error. please help me to fix that

this is my code

this.socialSharing.canShareViaEmail().then(() => { alert('into can share') this.platform.ready().then(() => { alert('into platform') this.socialSharing.shareViaEmail('Body', 'Subject', ['recipient@example.org']) }) }).catch((err) => { alert('Email not available') })

this is Error

Thanks For Help

1 post - 1 participant

Read full topic

Is sultana rajia tanny best freelancer?

$
0
0

Hi, this is sultana Rajia a graphics Designer . Graphic design is my passion. I love it to do it .I like to work creative design. I’m expert in Adobe photoshop, adobe illustrator and adobe indesign. My Design services include business cards, banner, logo, flyer, brochure, newsletter, company profile, photo-editing etc. CLIENT satisfaction is my TOP PRIORITY.I can GUARANTEE you that you will not have to proof read and copy check my work.

If I am a best freelancer then Why can’t I get more work online?

1 post - 1 participant

Read full topic

Live reload iOS gets stuck on splash screen on both emulator and device after Big Sur upgrade

$
0
0

Hi all,

I am having issues getting live reload to work after upgrading my macOS to Big Sur (11.4) and Xcode 12.5.1. I can run my app on an emulator or device just fine if I use ionic build && npx cap copy and I do not get any errors. However, when I try to run using live reload everything builds fine and the app opens but it gets stuck on the splash screen (or sometimes a white screen). I do not see any errors in the Xcode console or in Safari web inspector. Sometimes I am able to get past the splash screen if I re-run the app a few times (the behavior is unpredictable) but then when I change anything in my app code the app will disconnect from the live reload server.

My question is how do I go about debugging this issue? This is functionality that used to work for me without any problems.

Ionic info:

Ionic:

   Ionic CLI                     : 6.16.3 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.6.12
   @angular-devkit/build-angular : 12.0.5
   @angular-devkit/schematics    : 12.0.3
   @angular/cli                  : 12.0.5
   @ionic/angular-toolkit        : 4.0.0

Capacitor:

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

Utility:

   cordova-res : 0.15.3
   native-run  : 1.4.0

System:

   NodeJS : v14.17.3 (/usr/local/Cellar/node@14/14.17.3/bin/node)
   npm    : 6.14.13
   OS     : macOS Big Sur

7 posts - 2 participants

Read full topic

Ionic refresher issue with ionic scroll

$
0
0

Hi,
I’m using Ionic Refresher in my dashboard page, and also having ionic scroll section. it will scroll along y axis.
whenever I scroll down inside ion-scroll section, ionic refresher also gets triggered.
verison ionic-3

sample code -

<ion-content>
  <ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)" [enabled]="true">
    <ion-refresher-content pullingIcon="arrow-dropdown" pullingText="Pull to refresh" refreshingSpinner="circles" refreshingText="Refreshing...">
    </ion-refresher-content>
  </ion-refresher>

<ion-scroll style="height: 350px" scrollY="true">
// items to scroll
</ion-scroll>



</ion-content>

Thanks,

1 post - 1 participant

Read full topic

Sc-ion class changes app style

$
0
0

Hi,

We’re using Ionic Angular on a Debian 10 server. We’ve noticed that when we load our app in Chrome a new “sc-ion” class is added to some elements (sc-ion-icon-h, sc-ion-button-md-h, etc.) breaking our UI. Please see screenshots below.

Screenshot 2021-08-04 at 17.44.37

Does anyone know where this class comes from and how we can remove it?

Thanks,
Andy

1 post - 1 participant

Read full topic

Unable to remove BackButton Event listener Ionic 5

$
0
0

Unable to remove the BackButton Event Listener

Adding EventListener
ngOnInit() {
this.platform.backButton.subscribeWithPriority(9999, () => {
document.addEventListener(
“backbutton”,
function (event) {
event.preventDefault();
event.stopPropagation();
},
false
);
});
}

RemovingEventListner: also tries on onDestroy() and on button Click
ionViewDidLeave(){
document.removeEventListener(
“backbutton”,
function (event) {
event.preventDefault();
event.stopPropagation();
},
false
);
}

ionic info

Ionic:

Ionic CLI : 6.16.3 (C:\Users\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 5.0.7
@angular-devkit/build-angular : 0.901.3
@angular-devkit/schematics : 9.1.3
@angular/cli : 9.1.3
@ionic/angular-toolkit : 2.2.0

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0, browser 6.0.0, ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.0, (and 22 other plugins)
Utility:

cordova-res : 0.15.3
native-run : 1.4.0

System:

Android SDK Tools : 26.1.1 (C:\Users\AppData\Local\Android\Sdk)
NodeJS : v14.17.1 (C:\Program Files\nodejs\node.exe)
npm : 6.14.13
OS : Windows 10

What would be the right solution to it ?? Please Let me know…

1 post - 1 participant

Read full topic


Pass data from ion-modal on backdrop dismiss

$
0
0

Hi,

I would like to pass a value from an ion-modal to the modal opening component on modal backdrop dismiss. I know, that I can check that it was a backdrop dismiss by modal.role === ‘backdrop’. But I would like to pass a variable e.g. “inputFieldValue” from modal to the modal opener on backdrop dismiss.

Is this possible?

Thank you!

1 post - 1 participant

Read full topic

Can't display marker from http.get

$
0
0
map: any;

  @ViewChild('map', {read: ElementRef, static: false}) mapRef: ElementRef;
  data: any;
  infoWindows: any = [];
  markers: any = {};


  constructor(private http: HttpClient) {}

  get_location(){
    this.http.get('http://gsmgpsppm.000webhostapp.com/fetch_data.php')
    .subscribe(data =>{
      console.log("received: " + JSON.stringify(data[0][0]));
      this.markers = JSON.stringify(data[0][0]);
    });
  }

  ionViewDidEnter() {
    this.showMap();
  }

  addMarkersToMap() {
    this.get_location();
    let position = new google.maps.LatLng( this.markers["latitude"] ,  this.markers["longitude"] );
    let mapMarker = new google.maps.Marker({
      position: position,
      latitude: this.markers["latitude"],
      longitude: this.markers["longitude"]
    });

Given the above code, in function LatLng I can’t display markers data, received from an http.get as:

Is there anything wrong with the syntax??

1 post - 1 participant

Read full topic

Problem in facebook and google login

$
0
0

i have an application with ionic capacitor
and this is the ionic info

Ionic:

   Ionic CLI                     : 6.16.3 (/home/mersal/.nvm/versions/node/v14.17.0/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.6.9
   @angular-devkit/build-angular : 12.0.5
   @angular-devkit/schematics    : 12.0.5
   @angular/cli                  : 12.0.5
   @ionic/angular-toolkit        : 4.0.0

Capacitor:

   Capacitor CLI      : 3.1.0
   @capacitor/android : 3.0.2
   @capacitor/core    : 3.0.2
   @capacitor/ios     : not installed

Utility:

   cordova-res : 0.15.3
   native-run  : 1.4.0

System:

   NodeJS : v14.17.0 (/home/mersal/.nvm/versions/node/v14.17.0/bin/node)
   npm    : 7.16.0
   OS     : Linux 5.8
  • I am using this npm packages
    @capacitor-community/facebook-login and @codetrix-studio/capacitor-google-auth
    for facebook and google login.

  • facebook login and google login was working good till i uninstall npm packages of
    @capacitor-community/facebook-login and @codetrix-studio/capacitor-google-auth
    and reinstall them again

what happen is google login and facebook login working only in debug versions
but in release versions it’s not working and it’s not giving any action when pressing them (as i press in empty part of the screen)

1 post - 1 participant

Read full topic

How to get ion-select with headers (image provided)

Image not load in canvas after updadating to platform api 30 or cordova 10.0.1

$
0
0

when i try to load image in canvas it will show this error
Access to image at 'http://localhost/_app_file_/storage/emulated/0/Android/media/com.abc.xyz/1616587242F2.png' from origin 'https://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. in index.html.

I convert my url by this this.win.Ionic.WebView.convertFileSrc(imageUrl.toString()); but still i am facing this error.
if i used this URL in image tag then its worked but in canvas i am gating error.
Note : i think this error occurs because cordova 10.0.1 remove whitelist plugin. @mhartington

1 post - 1 participant

Read full topic

404 http://localhost:8200/lab-logo.png

Firebase and Capacitor 3

$
0
0

Hi,

I am about to start a new app that requires Firebase(authentication, database, …) and some map API (still not defined). I heard that there are issues with Capacitor and Firebase. Should I use Firebasex plugin with Capacitor or should I go with my old pal Cordova ? Any advice? Any other plugin with Capacitor ?

Thank you.

1 post - 1 participant

Read full topic


alertController only displays on the first page it was initalized on

$
0
0

I have a weird problem with the alertController in Ionic.

Let me describe it and then I will lay out my code.

I have an app in Ionic with tabs. So lets say I reload my app and land on Tab 1, I click a button and get an alert on that page. Then if I were to navigate to Tab 2, click another button to get a different alert. That alert doesn’t show up on Tab 2. But if I were to navigate to Tab 1, it will be there.

Here is my code for Tab 1

	const alert = await this.alertCtrl.create({
		header: 'Approved!',
		backdropDismiss: false,
		message:
			'Your application has been approved! You may start shopping now',
		buttons: [
			{
				text: 'Shop!',
				handler: async () => {
					this.util.navigateRoot('/shop');
				},
			},
		],
	});

	await alert.present();

And Tab 2

	const alert = await this.alertCtrl.create({
		header: 'Submitted!',
		backdropDismiss: false,
		message:
			'Awaiting approval',
		buttons: [
			{
				text: 'Shop!',
				handler: async () => {
					this.util.navigateRoot('/shop');
				},
			},
		],
	});

	await alert.present();

And of course I am importing alertController into the constructor of the component

I have done so much searching on this and no one seems to have the same issue.

1 post - 1 participant

Read full topic

Example using ionic infinite scroll v5 working with api

$
0
0

Hello!
In there could somebody help me give an example case working with API when using infinite scroll.

In ionic docs have one, but in generate create number. I was sucked how to limit API array list data and then I wanna scroll to the end of height, it will load more data until the end of the list array from API.

Please someone get help.

3 posts - 2 participants

Read full topic

Managing app version / build through config?

$
0
0

Is there a ways to manage the version and build number for an app through your capacitor config file? I didn’t see anything in documentation, but was hoping there was something similar to the way it was managed in Cordova.

1 post - 1 participant

Read full topic

What build commands do you use?

$
0
0

When developing I use ionic serve 90% of the time. But when it comes time to dev/test native functionality, what commands do you use?

I find the livereload functionality finicky so I find myself rebuilding the project for every code change which is time consuming.

I use this "build:ios:dev": "ionic build && ionic capacitor copy ios && npx cap open ios",

but I’m curious if there’s a way of use ionic serve to build only the changed parts of the project and then copy the build bundle to the app bundle that’s used by Xcode?

1 post - 1 participant

Read full topic

How to center component in react?

$
0
0

<IonTitle size="large">STOP</IonTitle>

How do I center the text? I want to do something like this:
<IonTitle size="large" style={{textAlign: 'center'}}>STOP</IonTitle>

1 post - 1 participant

Read full topic

Viewing all 70991 articles
Browse latest View live


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