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

[Ionic V4]How to remove last-child bottom border of ion-item in Ionic4

$
0
0

@avex wrote:

For Ionic V4,
how do you remove end line of last child of ion-items using css?
No scripts please!

<ion-button (click)="advanceOpts=!advanceOpts;">

<ion-list>
  <ion-item>
    <ion-label>Item1</ion-label>
    <ion-input></ion-input>
  </ion-item>
  <ion-item>
    <ion-label>Item2</ion-label>
    <ion-toggle slot="end"></ion-toggle>
  </ion-item>
  <ion-item *ngIf="advanceOpts">
    <ion-label>Item3</ion-label>
    <ion-radio slot="end"></ion-radio>
  </ion-item>
  <ion-item *ngIf="advanceOpts">
    <ion-label>Item4</ion-label>
    <ion-checkbox slot="start"></ion-checkbox>
  </ion-item>
</ion-list>

Posts: 1

Participants: 1

Read full topic


Property 'subscribe' does not exist on type 'MediaObject'

$
0
0

@jaimec14 wrote:

Hello I am i got stucked with my code with the error of Property 'subscribe' does not exist on type 'MediaObject'

Here is my code showing what im doing, and if someone could tell me what Im doing wrong and how to solve this issue. Thanks.

import { Media, MediaObject } from '@ionic-native/media/ngx';

  currentTrack: MediaObject = null;
constructor(private storage:Storage, private spotifyService:SpotifyApiService,private appConfig: AppConfigServiceService
  , private media: Media) { }
this.currentTrack = this.media.create(canciones[0][3].track.preview_url);
    this.currentTrack.subscribe(status => console.log(status)); // fires when file status changes
    this.currentTrack.play();

Posts: 2

Participants: 1

Read full topic

App store require Documents for authorized to distribute the content

$
0
0

@ebeliejinfren wrote:

Hi
i publish my application on app store but it’s not accepted in several time and the reviewer request for the document for authorized to distribute the content
but i don’t know how to document ?

the app store reviewer Answer :

Thank you for your message. Please respond with documentation attached, using the upload feature, evidencing that Jenyar has been authorized to distribute the content owned by the artists. Once Legal has reviewed your documentation and confirms its validity, we will proceed with your application review.

please if anybody know about this guide me
Thanks

Posts: 1

Participants: 1

Read full topic

How to mock sqlite plugin in ionic v4

$
0
0

@mehthaf wrote:

im using ionic 4 to develop my app . im stuck in ionic sqlite . because it did not work in browser .so any one tell me. how to mock sqlite plugin in ionic v4

Posts: 1

Participants: 1

Read full topic

App crashes on device when executing http request but working on browser

$
0
0

@scriline wrote:

Hi guys !

Something very strange happens currently on my app. I’m trying to execute a http get request with my app and it works perfectly on my browser, but when I try it on my android device, it crashes.
Actually, everything works perfectly until I click the “calcul” button I created. At this very moment the app closes and well, I’ve got no hint what it can be linked to.

Searching on forums, I tried to remove and install again android platform but didn’t change anything…

Here you have my ionic info, the code where I execute the http request and a strange error I’m getting for a few days, it may be related to that…

Thanks for your help !

Posts: 1

Participants: 1

Read full topic

Ionic 4: How to upload image to server using php

$
0
0

@emtech wrote:

I am trying to create a profile photo upload page, I’'m somehow not getting it to work. can some one help?


async openeditprofile() {
  let actionSheet = await this.actionsheetCtrl.create({
    header : "select an option",
    cssClass: "action-sheets-basic-page",
    buttons: [
      {
        text: 'Take photo',
        role: 'destructive',
        icon: 'Camera',
        handler: () => {
           this.takephoto();
        }
      },
      {
        text: 'Choose photo from Gallery',
        icon: 'folder',
        handler: () => {
          this.send();
          // this.openGallery(); 
          
        }
      },
]
});
actionSheet.present();
}



takephoto() {
        const options: CameraOptions = {
           quality: 100,
         destinationType: this.camera.DestinationType.DATA_URL,
         encodingType: this.camera.EncodingType.JPEG,
         mediaType: this.camera.MediaType.PICTURE
       }
  
     this.camera.getPicture(options).then((imageData) => {
         // imageData is either a base64 encoded string or a file URI
         // If it's base64:
         this.base64Image  = 'data:image/jpeg;base64,' + imageData;
      
       this.imageData=imageData
       this.image=(<any>window).Ionic.WebView.convertFileSrc(imageData);
    
       
      this.presentToast(this.base64Image);
      this.upload();
        }, (err) => {
          console.log(err);
          this.presentToast(err);
        })
      }


   






    async  openGallery() {
        
             const options: CameraOptions = {
                quality: 100,
                destinationType: this.camera.DestinationType.DATA_URL,
                encodingType: this.camera.EncodingType.JPEG,
                mediaType: this.camera.MediaType.PICTURE,
                sourceType: this.camera.PictureSourceType.SAVEDPHOTOALBUM
              }
         
              this.camera.getPicture(options).then(async (imageData) => {
               // imageData is either a base64 encoded string or a file URI
                // If it's base64:
                this.base64Image  = 'data:image/jpeg;base64,' + imageData;
               
                
                this.imageData=imageData
                this.image=(<any>window).Ionic.WebView.convertFileSrc(imageData);
              
             this.presentToast(this.base64Image);
            
             const loading = await this.loadingController.create({
              message: 'Uploading please wait...',
              });
            await loading.present();
         
  
           this.upload();
              }, (err) => {
                console.log(err);
               this.presentToast(err);
             })}

 




/////////////////////////////////


async upload()
  {
    const loading = await this.loadingController.create({
      message: 'Uploading...',
      });
    await loading.present();

    const fileTransfer: FileTransferObject = this.transfer.create();

    let options1: FileUploadOptions = {
       fileKey: 'file',
       fileName: 'name.jpg',
       headers: {}
    
    }

   

fileTransfer.upload(this.imageData, 'http://192.168.0.102/io3/upload.php', options1)
 .then((data) => {
   // success
   loading.dismiss()
    this.presentToast(data + 'Profile photo uploaded successfully');
 }, (err) => {
   // error 
   console.log(err);
   loading.dismiss();
   this.presentToast(err);
 });
  }



   ///////////////////////////////////
   
   
 

  

Posts: 1

Participants: 1

Read full topic

Few questions about ionic 4

$
0
0

@IAmos wrote:

Hi

I’m new to Ionic and wanted to ask several things:

  1. Is there a way to use this component in Ionic? https://github.com/sujithkanna/SmileyRating
    If not, is there a similar component in Ionic?

  2. I have a thermometer component. The name suggests its features and purpose, is there something similar in Ionic?

  3. Can I develop once in Ionic and use the app for both mobile and web? Do I need a special hosting to run ionic as a web application?

  4. I’m using VSCode. Are there any special addons I should download before starting to develop in Ionic?

  5. Can I use Ionic with Firebase/FireStore/Authentication?

Thanks

Posts: 1

Participants: 1

Read full topic

Dismiss Loading Component when HTTP request finish

$
0
0

@irvingprog wrote:

HI Everyone

I was trying to figure out how to make the LoadingControlller work with an HTTP request. I didn’t find a solution to this in the forum or stackoverflow.

Thinking a little bit i find this way to: fire Loading component -> make an HTTP request > hide loading component.

import { HttpClient } from '@angular/common/http';
import { LoadingController } from '@ionic/angular';
import { from } from 'rxjs';
....
  ngOnInit() {
    from(this.presentLoading())
    .subscribe(() => {
      this.http.get(url) 
      .subscribe(
        (data) => {
          console.log(data);
        },
        (error) => {
          console.log(error)
        }
      )
      .add(() => this.loading.dismiss());
    });
  }

  private async presentLoading(): Promise<any> {
    this.loading = await this.loadCtrl.create({
      message: 'Please wait ...',
    });
    return await this.loading.present();
  }
}

This is working and it solved my problem but i want to know if my solution is correct and if there is a better way to do it.

Related: (None of the solutions there worked for me)
https://forum.ionicframework.com/t/dismiss-a-loadingcontroller/141148
https://github.com/ionic-team/ionic/issues/15109

Ionic:

   ionic (Ionic CLI)             : 4.9.0 (/usr/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.2
   @angular-devkit/build-angular : 0.12.4
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.2.4
   @ionic/angular-toolkit        : 1.4.0

System:

   NodeJS : v11.7.0 (/usr/bin/node)
   npm    : 6.7.0
   OS     : Linux 4.4

I really appreciate any comments you can provide.

Posts: 1

Participants: 1

Read full topic


Ios access device local files (pdf ,doc)

$
0
0

@mfouash wrote:

i’m using chooser plugin to allow user select file from his device
it’s work as expected on android but there is problem with ios
the file manger on ios appear empty and no option to explore stored files on device like pdf,doc
any suggestion for this problem please

Posts: 1

Participants: 1

Read full topic

Ionic serve not refreshing

$
0
0

@Samide wrote:

when I install Ionic 4 everything is fine and the browser refresh the app,
but when I use Ionic v3 It doesn’t refresh and i should type ionic serve every time I made a change.
I want to work with Ionic v3 because i want to attach a pre fill database, for that i need www dir to place my Db and i can’t find it in Ionic v4
I hope you understand my weak English
Thank you in advance

Posts: 1

Participants: 1

Read full topic

Listen to power button pressing

$
0
0

@claudiomerli wrote:

Hi, is there any method for handle power button event?
Similar to

this.platform.registerBackButtonAction(...)

but without preventing its normal function.
Imagine as background app wich count each time user press power button.

Thank you!

Posts: 1

Participants: 1

Read full topic

Doubts choosing a reliable and flexible framework for the back-end

$
0
0

@ioclaudio wrote:

Hi,
I don’t know if it is this an off-topic question, however, I think that for an Ionic developer this is a problem that sooner or later has to be addressed.

I will develop an app with Ionic and I’m looking for the best back-end to use.
The app will use REST web-service to send and receive data to/from the back-end that will store/retrieve them on/from a database.
On the server side, I need to implement a lot of logic, so I don’t need a framework that just allows me to use a database but a flexible framework that allows me to implement the logic and the algorithms.
The server should manage many simultaneous connections and serve all of them.

Until now I’ve always used PHP Frameworks, now I’m evaluating some Javascript framework as NestJS that is based on Node.js.

My doubts are about the ability to manage many connections at the same time because I know that Node.js is a single thread server.
How can it serve tens or hundreds of simoultaneous requests?
The PHP frameworks use Apache, but how can I be sure that Node.js will not be the bottlenec of my system?

Thank you very much for your advice.

Claudio

Posts: 1

Participants: 1

Read full topic

Ionic serve error dlopen failed

Running Android Application for 24hrs

$
0
0

@phyopwint wrote:

I am working on android application using ionic framework for event which is supposed to run 24hrs on screen. My app is working fine around 15hrs and its started to flickering all of the images and sometime hang. I restarted the device and run application again, only first 10mins-20mins work, rest of the time app becomes flickering. My app is 594.6 MB size big.

Use Case - Showing 5 images and one video as carousel. Every second I’m calling backend API to get the result from Arduino. based on different result, I’ve showed different content.

Phone Spec - OS: Android 9 CPU: Octa-core chipset RAM: 8GB

Thank you so much for helping me out. I don’t know its device problem or my code has issues. Could someone suggest me what is possible reason. Regards.

Posts: 1

Participants: 1

Read full topic

Camera ionic

$
0
0

@phongbn96 wrote:

How to delete images stored on the cache after taking photos with ionic / camera ?
That makes my cache bigger and bigger

Posts: 1

Participants: 1

Read full topic


Como puedo generar elementos html al presionar un boton

$
0
0

@nelsonmnm wrote:

Quiero agregar filas dinamicamente al presionar un boton, estas filas contendran registros que enviare como un array, necesito ayuda

Posts: 1

Participants: 1

Read full topic

Obtener la una propiedad de un item seleccionado desde un ion-select

$
0
0

@nelsonmnm wrote:

Quisiera saber como acceder a una propiedad de un item seleccionado en un select, en este select se cargan objetos ej: Id, Precio, NombreProd, Stock, quiero usar la propiedad Precio para multiplicarla por la cantidad que sera introducida por el usuario y guardare el resultado

Posts: 1

Participants: 1

Read full topic

Requirements check failed for JDK 1.8 while generating for android

$
0
0

@anuj9196 wrote:

I’m starting with Ionic 4.

I have created my application and its running in web browser. Now, I want to generate apk file for Android.
For that, I run following command

ionic cordova build --release android --verbose

But this gives error as

Preparing Firebase on Android
No scripts found for hook "before_compile".
Running command: /usr/libexec/java_home
Command finished with error code 0: /usr/libexec/java_home
ANDROID_HOME=/Users/anuj/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home
Requirements check failed for JDK 1.8
CordovaError: Requirements check failed for JDK 1.8
    at /Users/anuj/code/ionic/no11/platforms/android/cordova/lib/check_reqs.js:362:19
    at _fulfilled (/Users/anuj/code/ionic/no11/platforms/android/cordova/node_modules/q/q.js:834:54)
    at /Users/anuj/code/ionic/no11/platforms/android/cordova/node_modules/q/q.js:863:30
    at Promise.promise.promiseDispatch (/Users/anuj/code/ionic/no11/platforms/android/cordova/node_modules/q/q.js:796:13)
    at /Users/anuj/code/ionic/no11/platforms/android/cordova/node_modules/q/q.js:604:44
    at runSingle (/Users/anuj/code/ionic/no11/platforms/android/cordova/node_modules/q/q.js:137:13)
    at flush (/Users/anuj/code/ionic/no11/platforms/android/cordova/node_modules/q/q.js:125:13)
    at process._tickCallback (internal/process/next_tick.js:61:11)
[ERROR] An error occurred while running subprocess cordova.

I installed java and jdk

java --version
$ java 11.0.2 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)

$ javac --version
javac 11.0.2

$ whereis java
/usr/bin/java

$ whereis javac
/usr/bin/javac

Posts: 1

Participants: 1

Read full topic

Android: Video playback in tag from external storage

$
0
0

@umeshj wrote:

I am trying to play a downloaded video in my app. But when i provide ‘src’ as “file:///storage/…” path the console gives the error not allowed to load local resources. Does anyone have tried to play a video using html5 video tag. If resource available please point.

Posts: 1

Participants: 1

Read full topic

Ionic 4 with AngularJS + Cordova + Webpack

$
0
0

@raz-ride4you wrote:

I don’t want Angular7 in my new Ionic project. Ionic declares that Ionic 4 is framework agnostic, but their CLI seems to be only friendly with Angular7.

I would like to create a project using AngularJS version 1.7.2, compiled with webpack - so I can have the ability to export and import files, and wrapped by cordova so I can bundle it to the AppStores.

However there isn’t any boilerplate under the hood and I started creating a new one but mess with too many things.

I wonder if there any good tutorial making this work the same way I would like?

Furthermore, is there any method to allow using the Ionic CLI with none angular project? for example, on pure JS?

Posts: 2

Participants: 2

Read full topic

Viewing all 70440 articles
Browse latest View live


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