Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all 48980 articles
Browse latest View live

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


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

Ios app self-update in ionic

$
0
0

@coolestsumit wrote:

please let me know is ios app self-update is possible in ionic . if yes , then how…waiting for response… thanks in advance

Posts: 1

Participants: 1

Read full topic

Quiz game app

$
0
0

@joseph7 wrote:

Hey guys,

I’ll be developing quiz-like game application in Ionic, and I have a few questions.

The application should have log-in capabilities, with friend list and of course database of questions.
Which services should I use? I have found this topic Backend for Quiz-App where the answer is to maybe use some PHP frameworks, but to be honest im not to keen with PHP.
What are my other options? Thank you in advance.

Kind Regards,
Filip

Posts: 1

Participants: 1

Read full topic

The first doesn't vanish on real device

$
0
0

@abdul4 wrote:

Hello everyone. I’m currently working on mobile app using ionic, but recently I faced an obstacle.
1: Whenever I run the app on browser ionic serve --lab it runs perfectly.
2:When I run the application on android real device, it can’t open the app and sticks with the first view, and it never vanishes the default spinner, however while I debug the app using chrome://inspect, there it shows the login page.
I’m gonna provide some screen shots as well.

The app is runs on real device, but never shows this (login) page. However on chrome it works perfectly.


This is the spinner page.
Here is my app.component.ts file. 
import { Component, ViewChild } from '@angular/core';
import { Nav, Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { Push, PushObject, PushOptions } from '@ionic-native/push';
import { Storage } from '@ionic/storage';
import { App } from 'ionic-angular';
import { HomePage } from '../pages/home/home';
import { ListPage } from '../pages/list/list';
import { AboutPage } from '../pages/about/about';
import { CartPage } from '../pages/cart/cart';
import { timer } from "rxjs/observable/timer";
import { LoginPage } from '../pages/loginPages/loginMainPage/login';

@Component({
  templateUrl: 'app.html'
})
export class MyApp {
  @ViewChild(Nav) nav: Nav;
  rootPage: any = LoginPage;
  showSplash = true;
  pages: Array<{ title: string, component: any, icon }>;
  sendGetRequest() {
    // ****** Pack the all return in the new promise ******
    return new Promise(async (resolve, reject) => {
      await this.storage.length().then(async (data) => {
        if (data >= 1) {
          console.log('There is one data');
          await this.storage.get('isLogined').then(value => {
            console.log('value is', value);
            // if (value) this.app.getActiveNav().setRoot(LoginPage);
          }
          );
          this.statusBar.styleDefault();
          this.splashScreen.hide();

        }
      }).catch((error) => {
        console.log('error while accessing isLogined \n' + error);
        reject(error);
      })
    });

  }

  constructor(private push: Push,
    public platform: Platform,
    public statusBar: StatusBar,
    public splashScreen: SplashScreen,
    public storage: Storage,
    public app: App) {
    console.log('The fist line of constructor ');
    this.platform.ready().then(async () => {


      timer(3000).subscribe(async () => {
        await this.sendGetRequest();

        this.showSplash = false;

      })

    })
  }
  ngOnInit() {
    console.log('ngOnInit');
    this.pushSetup();


    // used for an example of ngFor and navigation
    this.pages = [
      { title: 'خانه', component: HomePage, icon: 'home' },
      { title: 'پروفایل', component: ListPage, icon: 'person' },
      { title: 'سبد خرید', component: CartPage, icon: 'cart' },
      { title: 'درباره', component: AboutPage, icon: 'person' },

    ];

  }

  initializeApp() {
    this.platform.ready().then(() => {
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.
      this.statusBar.styleDefault();
      this.splashScreen.hide();

      timer(3000).subscribe(() => this.showSplash = false)
    });
  }
  pushSetup() {

    // to check if we have permission

    this.push.hasPermission().then((res: any) => {
      if (res.isEnabled) { console.log('We have permission to send push notifications'); } else {
        console.log('We do not have permission to send push notifications');
      }
    });


    const options: PushOptions = {
      android: { senderID: "551951714209", },

      ios: { alert: 'true', badge: true, sound: 'false' },
    };

    const pushObject: PushObject = this.push.init(options);
    pushObject.on('notification').subscribe((notification: any) => console.log('Received a notification', notification));
    pushObject.on('registration').subscribe((registration: any) => console.log('Device registered', registration.registrationId));
    pushObject.on('error').subscribe(error => console.error('Error with Push plugin', error));
  }


}

Note: let me know if I need to upload more stuffs.

Posts: 1

Participants: 1

Read full topic

Layout changed for published app

$
0
0

@lsantaniello wrote:

Hi All,
I have a strange issue with my published app. it seems that styles are no longer loaded. No release has been made.

The problem has beed replicated on Android device and Chrome browser. I think the problem is an chrome update.

Now I have the same problem on local machin (chrome browser only). I created a new page into my app and the problem persist.

<ion-header>
  <ion-navbar>
    <ion-title>Test</ion-title>
  </ion-navbar>
</ion-header>
<ion-content padding>
  <div class="test-luca">Ciao</div>
</ion-content>
page-test {
  .test-luca {
    color: red;
  }
}

ionic info

Ionic:

   ionic (Ionic CLI)  : 4.10.3 (C:\Users\xxx\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.1.9

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.0.0, browser 5.0.3, ios 4.5.4
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 1.1.1, (and 8 other plugins)

System:

   Android SDK Tools : 26.1.1 (C:\Users\xxx\AppData\Local\Android\sdk)
   NodeJS            : v8.9.4 (C:\Program Files\nodejs\node.exe)
   npm               : 5.6.0
   OS                : Windows 10

Could you please help me?

Thanks
Luca

Posts: 1

Participants: 1

Read full topic

[Ionic v4] Angular form control status classes(ng-*** != ion-***)

$
0
0

@jonmikelm wrote:

We are deveolping a new app using Ionic/angular 4.x and we are finding several problems related to form validation.

Ionic v4 components are supposed to implement the same behaviour as a vanilla HTML form input field in an angular app. It looks like ionic components try to apply an equivalent ion-*** class for each ng-*** class that angular applies to form elements.

We have verified that in most cases ionic component ion-*** classes are updated correctly at the same time as ng-*** classes when a form value changes. But if you use the angular forms “markAs***” functions to update the status of a form control, ion-*** classes are not updated.

We make heavy use of angular forms in our app and we are finding quite difficult to manage form control styling without using hacky workarrounds.

Is there anyone else experiencing these kind of problems?

Posts: 1

Participants: 1

Read full topic


Rtl and ltr? Will this work?

$
0
0

@CreativeArtDesign wrote:

Will this work? in the in the global style ?

:root[dir="rtl"] {
  .my-header {
      font-size: 20px;
      font-family: arabic-font;
      padding:0px;
      color: #FFFFFF;
      background-color: #cccccc;
  }
}

:root[dir="ltr"] {
  .my-header {
      font-size: 20px;
      font-family: normal-font;
      padding:0px;
      color: #FFFFFF;
      background-color: #001b3c;
  }
}

Or is there other ways? to use two style css depends on RTL AND LTR?

Posts: 1

Participants: 1

Read full topic

Set 'Requires Android' version in Play Store

$
0
0

@Dovel wrote:

How to set the Requires Android version in Play Store? It is always 4.4 for all Ionic Cordova Android Apps.
requires-android-version-play-store

The preference android-minSdkVersion in config.xml is set to 22 (Android 5.1). Also android-targetSdkVersion has no effect. And I found nothing in the developer section of Play Store.

Posts: 1

Participants: 1

Read full topic

How to get the parameter value outside of promise

$
0
0

@Velmurugan wrote:

Hi ,

I am having the below code…

my Logged_user value is ‘9715328568’

this.logged_user=this.navParams.get('logged_user');  // ---   result undefined
if (this.logged_user ==undefined){                                        
  this.storage.get('username').then((auth) => {
    this.logged_user=auth;  
    console.log(this.logged_user,' is already  logged in '); //---- result '9715328568,' is already  logged in '
  });
  
  console.log(this.logged_user,' is already logged in signup screen');   //-- result undefined  is already logged in signup screen
  
}else{
  this.logged_user=this.logged_user
}

Outside of promise its shwing as indefined …
“console.log(this.logged_user,’ is already logged in signup screen’); //-- result undefined is already logged in signup screen”

Posts: 1

Participants: 1

Read full topic

Back button does not change text dynamically

$
0
0

@john33john33 wrote:

After setting back button text using config,
it does not reflect right away in nav bar.
Have to pop and push the page again.

playground:


you can see in contact page,
setting back button text does not reflect in self page and even in other nav stack

I suspect this is a bug and have opened a issue:


and find another issue similar:

is that a ionic bug / my program bug?
hope to see advice

Posts: 1

Participants: 1

Read full topic

How use bluetoothLE

Viewing all 48980 articles
Browse latest View live


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