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

Simple android App working on browser(ionic serve) but not on device and emulator

$
0
0

@akshayajeevan wrote:

I followed the ionic starter and created a simple app.
When I am trying ionic serve app opens in browser and I am to see the home and list of items.
When I am trying ionic cordova build android , build get success and apk gets created inside platforms/android/… path.
After installing this apk on an android emulator or device, when I opens the app, it crashes and android shows Open again popup message.

I do not know what is the problem here. Please help.

Below are some info -

>ionic info
Ionic:

ionic (Ionic CLI) : 4.6.0 (C:\Users\1231083\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.1

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.2
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.1, (and 4 other plugins)

System:

Android SDK Tools : 26.1.1 (C:\Users\1231083\AppData\Local\Android\Sdk)
NodeJS : v10.11.0 (C:\Program Files\nodejs\node.exe)
npm : 6.5.0
OS : Windows 7

>ionic cordova plugin ls
com.salesforce 7.0.0 “SalesforceMobileSDK Plugins”
cordova-plugin-device 2.0.2 “Device”
cordova-plugin-ionic-keyboard 2.1.3 “cordova-plugin-ionic-keyboard”
cordova-plugin-ionic-webview 2.3.1 “cordova-plugin-ionic-webview”
cordova-plugin-splashscreen 5.0.2 “Splashscreen”
cordova-plugin-statusbar 2.4.2 “StatusBar”
cordova-plugin-whitelist 1.2.0 “Whitelist”

Posts: 1

Participants: 1

Read full topic


How to add multiple buttons to footer / toolbar

$
0
0

@shorstmann wrote:

Hello,

i need to add a toolbar to the footer of a page with 5 buttons. These buttons should be placed fine like in this example:

The example was made with xcode and works fine. I want to have it with ionic too.

<ion-footer>
  <ion-toolbar>
    <button ion-button>
      <ion-icon name="person-add"></ion-icon>
    </button>
    <button ion-button>
      <ion-icon name="alert"></ion-icon>
    </button>
    <button ion-button>
      <ion-icon name="undo"></ion-icon>
    </button>
    <button ion-button>
      <ion-icon name="create"></ion-icon>
    </button>
    <button ion-button>
      <ion-icon name="checkmark-circle"></ion-icon>
    </button>
  </ion-toolbar>
</ion-footer>

Unbenannt

Posts: 1

Participants: 1

Read full topic

Ng build --prod not working in Ionic3 Electron

How to convert ionic 4 project to ionic 3

$
0
0

@cemkocagoz wrote:

Hello,
I have an issue with ionic 4. My ionic 4 projects (basic projects too, i mean i just run create project code with cli and deployed) not working well on android kitkat, lollipop, marshmallow (4.4, 5 , 6). Ionic 4 project stuck on white screen after splash screen and never work. But its not happen on ionic 3. So i want to transform my main ionic 4 project to ionic 3. Is that possible? Could i use angular 7 and angular material with ionic 3?

Posts: 1

Participants: 1

Read full topic

Capacitor persisitent local notification

$
0
0

@nathantaal wrote:

Hello everyone,

Is it possible to make a notification that’s persistent (on android) so it cannot be swiped away easily or is it not possible (yet)?

Oh and Ps. Is there a place I can go to with capacitor questions yet? Because there is no category tag for capacitor but then again capacitor is not part of ionic so that would make sense :slight_smile:

Posts: 1

Participants: 1

Read full topic

Can anyone tel me that how to use the cordova-plugin-printer?

$
0
0

@ivan5182 wrote:

Can anyone tel me that how to use the cordova-plugin-printer ?
Please

I only can make the following code in home.ts :

constructor(public navCtrl: NavController, private printer: Printer) {
this.printer.isAvailable().then(
function (onSuccess) {
alert(“onSuccess”);
},
function (onError){
alert(“onError”);
}
);
}

can anyone tell me that how to use check() and pick() and print(content, options), please

Posts: 1

Participants: 1

Read full topic

Transpile started not finished

$
0
0

@reginaldonoronha wrote:

Hi I have a problem when I am running the command ionic serves -b or ionic serves --lab
It’s no more than the transpile started.

Ionic:

ionic (Ionic CLI) : 4.6.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.1

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.1, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.1, (and 14 other plugins)

System:

ios-deploy : 2.0.0
ios-sim : 5.0.13
NodeJS : v8.12.0 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61

ionic-app-scripts serve --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
[app-scripts] [12:31:39] ionic-app-scripts 3.2.1
[app-scripts] [12:31:39] watch started …
[app-scripts] [12:31:39] build dev started …
[app-scripts] [12:31:39] clean started …
[app-scripts] [12:31:39] clean finished in 1 ms
[app-scripts] [12:31:39] copy started …
[app-scripts] [12:31:40] deeplinks started …
[app-scripts] [12:31:40] deeplinks finished in 200 ms
[app-scripts] [12:31:40] transpile started …

Posts: 1

Participants: 1

Read full topic

Basic question about ion-row

$
0
0

@blondie63 wrote:

Sorry for this basic question but i’m new here:
this is my code:

  <ion-row>
        <ion-img class="pic-logo" src="assets/img/piclogo.png"></ion-img>
  </ion-row>

and i see this:

The row hight is less the image… why ? whats wrong ?
Thanks for help

Posts: 2

Participants: 2

Read full topic


Background mode not work when i press middle button android

$
0
0

@Saenz wrote:

Hello good day! my problem is that I have installed the background mode and background geolocation plugins and it works only when I lock the screen of the blocking button, but when I touch the button to return to the desktop the app stops updating the location. Does anyone have any idea what may be happening?

Thanks!!

Posts: 1

Participants: 1

Read full topic

[Ionic-v4] No installed build tools found

$
0
0

@fadeyer wrote:

Hi,
I’m trying to compile android apk, but I get the error “No installed build tools found.”

$ ionic cordova build android

Error:

...
Android Studio project detected
Preparing Firebase on Android
ANDROID_HOME=/usr/lib/android-sdk
JAVA_HOME=/usr/lib/jvm/java-8-oracle
studio
Subproject Path: CordovaLib
Subproject Path: app

FAILURE: Build failed with an exception.

* Where:
Script '/home/ubuntu/lapp/platforms/android/CordovaLib/cordova.gradle' line: 68

* What went wrong:
A problem occurred evaluating project ':CordovaLib'.
> No installed build tools found. Install the Android build tools version 19.1.0 or higher.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
/home/ubuntu/lapp/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* Where:
Script '/home/ubuntu/lapp/platforms/android/CordovaLib/cordova.gradle' line: 68

* What went wrong:
A problem occurred evaluating project ':CordovaLib'.
> No installed build tools found. Install the Android build tools version 19.1.0 or higher.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
[ERROR] An error occurred while running subprocess cordova.
        
        cordova build android exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.

Environment Variables:

export ANDROID_HOME=/home/ubuntu/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
$ echo $ANDROID_HOME
/home/ubuntu/Android/Sdk

$ echo $JAVA_HOME
/usr/lib/jvm/java-8-oracle

$ echo $PATH
...
/usr/lib/jvm/java-8-oracle/bin:
/usr/lib/jvm/java-8-oracle/db/bin:
/usr/lib/jvm/java-8-oracle/jre/bin:
/home/ubuntu/Android/Sdk/platform-tools:
/home/ubuntu/Android/Sdk/tools:
/home/ubuntu/Android/Sdk/build-tools:
/home/ubuntu/Android/Sdk/tools/bin:
/home/ubuntu/Android/Sdk/emulator

I try:

ionic cordova platform remove android
ionic cordova platform add android

After all this, I installed all the SDKs from Android 4.3 and all Android SDK build-tools from 19.0.3, but even this did not help.

any ideas?

$ ionic info

Ionic:

   ionic (Ionic CLI)             : 4.6.0 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.0-rc.0
   @angular-devkit/build-angular : 0.11.4
   @angular-devkit/schematics    : 7.1.4
   @angular/cli                  : 7.1.4
   @ionic/angular-toolkit        : 1.2.2

Cordova:

   cordova (Cordova CLI) : not installed
   Cordova Platforms     : not available
   Cordova Plugins       : not available

System:

   Android SDK Tools : 26.1.1 (/home/ubuntu/Android/Sdk)
   NodeJS            : v10.14.2 (/usr/local/bin/node)
   npm               : 6.4.1
   OS                : Linux 4.15

Posts: 1

Participants: 1

Read full topic

Ionic 4 (FIOUR) Simple Login - Inputs not binding on Andriod

$
0
0

@Morgs009 wrote:

I implemented a simple login with email and password and it works when I test in the browser as well as Ionic DevApp. However the login fails when I build the project and run it on an actual Android phone because it seems as though the binding of the inputs to the class properties isn’t happening as they’re always undefined . Here’s my login.page.html:

<form>

    <ion-item>
      <ion-label position="floating">Email Address</ion-label>
      <ion-input type="email" name="email" [(ngModel)]="email"></ion-input>
    </ion-item>

    <ion-item>
      <ion-label position="floating">Password</ion-label>
      <ion-input type="password" name="password" [(ngModel)]="password"></ion-input>
    </ion-item>

    <div text-left style="margin-top: 30px; padding: 0 10px;">

      <ion-button color="tertiary" shape="round" (click)="SignIn()" expand="full">
        SIGN IN
        <ion-icon slot="end" name="md-log-in"></ion-icon>
      </ion-button>

    </div>
</form>

Here’s my login.page.ts:

import { Component, OnInit } from '@angular/core';
import { NavController, AlertController, LoadingController, MenuController } from '@ionic/angular';

import { UserService } from '../user.service';

@Component({
  selector: 'app-login',
  templateUrl: './login.page.html',
  styleUrls: ['./login.page.scss'],
})

export class LoginPage implements OnInit 
{
  public email: string;
  public password: string;

  constructor(public nav:NavController, public auth: UserService, public alertCtrl: AlertController, public loadingCtrl: LoadingController, public menuCtrl: MenuController) 
  {
    this.menuCtrl.enable(false);
  }

  ngOnInit() 
  {

  }

  async SignIn()
  {
    await this.auth.Login({ email: this.email, password: this.password });

    if ( this.auth.CurrentUser != undefined && this.auth.CurrentUser.Code == 1)
    {
      this.nav.navigateForward("/home");
    }
    else if ( this.auth.CurrentUser != undefined  && this.auth.CurrentUser.Message != "" )
    {
      this.ShowMessage("Error", this.auth.CurrentUser.Message);
    }
  }
}

And here’s a piece of my user.service.ts:

async Login( login: any ) 
  {
    if ( login.email === undefined || login.password === undefined ) 
    {
      this.CurrentUser = { Code: -1, Message: `Email address and password required.` }; // IT KEEPS FAILING HERE

      return;
    }

    var loading = await this.ShowLoading();

    try
    {
      var url = `${this.APIUrl}/api/Account/Get?email=${login.email}&password=${login.password}&apikey=${this.APIKey}`;
      this.CurrentUser = await this.http.get<iUserModel>(url).toPromise();

      // Store User Details
      this.storage.set("CurrentUser", this.CurrentUser);
    }
    catch( error )
    {
      loading.dismiss();

      this.CurrentUser = { Code: -1, Message: JSON.stringify( error ) };

      return;
    }

    loading.dismiss();
  }

I’ve checked the login.module.ts does import the FormsModule. Is there something I am missing?

Posts: 1

Participants: 1

Read full topic

Change font size for all content in app

$
0
0

@hanan150 wrote:

I have Settings in my app, the user can change the font size from radio button to make font bigger or smaller, how I can apply this idea

I tried different methods but always Fail

there any idea o any way

this html code

 <ion-item text-right>
      <ion-label color="dark" >notchange</ion-label>
      <ion-radio value="always" checked (ionSelect)="lineunchange()"></ion-radio>
    </ion-item>
    <ion-item text-right> 
      <ion-label color="dark">big</ion-label>
      <ion-radio value="big" (ionSelect)="linebig()" class="testclass">

      </ion-radio>   
    </ion-item>
    <ion-item text-right>
      <ion-label color="dark">small</ion-label>
      <ion-radio value="small" (ionSelect)="linesmall()"></ion-radio>
    </ion-item>

Posts: 1

Participants: 1

Read full topic

Can I stay with Ionic 3 for the future usage?

$
0
0

@hn162 wrote:

First, I want to thank the Ionic team for their dedication with the platform’s development and improvement. The ionic 4 has been presented for quite a time and brought a lot of new cool things and stuff as always though I haven’t tried it myself to be honest. My question is, in the case that I choose to stay with Ionic 3 without upgrading (for both my old and future projects), would I still be able to use it without any obstacle just like they way it is as the current time? Especially with the rapid changes of Android and iOS and no support from the Ionic team since they have migrated to and focus on the new version.

Posts: 1

Participants: 1

Read full topic

Ionic 4 with D3 charts js

Creating a Subscription payment App

$
0
0

@thehuangkai wrote:

Hi everyone,

I am building an ionic3 app with a subscription business model. Basically the user pays a fix sum a month to access the app features. I am using firebase as the backend.

I am not sure what are the best ways to do so. I think I should be using some native plugins either for the app store or maybe some plugin for stripe/paypal?

Will be great if someone with experience in this area can share more, thanks!

Posts: 1

Participants: 1

Read full topic


While calling provider method, value is not returning

$
0
0

@salomon022 wrote:

Hi, While I calling provider method in home page, value is not returning.

Home.ts

import { MediaProvider } from '../../providers/media/media';


export class HomePage {
private val;
constructor(private media:MediaProvider)
{
	this.get()
}
get()
{
	this.val = this.media.get();
	alert(this.val);
}
}

media.ts

export class MediaProvider {
	public val;
  constructor()
  {}
  get()
  {
	this.val="app";
	return this.val;
  }
 }

Help me in this.

Posts: 1

Participants: 1

Read full topic

How to reload current page in ionic 3 without losing stack navigation and data

$
0
0

@vandiepbui wrote:

Hi all,

I have a function upload_images(). I want reload current page whenever that function finished to get new images which just be uploaded.

How can I do that without losing stack navigation because I find a way to reload but stack navigation will lost.

this.navCtrl.setRoot(this.navCtrl.getActive().component);

Posts: 1

Participants: 1

Read full topic

TLS1.2 SSL version setting in HTTP Request

How to pass variable in iframe?

IONIC v3 WooCommerce CORS problem for SIGNUP user

Viewing all 48983 articles
Browse latest View live


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