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

Event before install app. Update database in exesting app

$
0
0

@anton_klochko wrote:

Hi all ! Could anyone suggest please, if exist way to listen installing new build and do alter table in SQLite if needable ?

Posts: 1

Participants: 1

Read full topic


Support for alternateIconName

[Ionic 3] Empty List with *ngFor and pipe (present data from object)

$
0
0

@marcooliva wrote:

Hello,

I am trying to list with *ngFor and a pipe data from an object but it’s not working.

I am trying to do this:

but i am presented with:

Can anyone help me, please?

Thanks!

Template - home.html

<ion-header>
  <ion-navbar>
    <ion-title text-center>
      Contactos
    </ion-title>
  </ion-navbar>
</ion-header>

<ion-content>

<ion-list>

  <button ion-item *ngFor="let theUser of myUser | keys">

    <ion-avatar item-start>
      <img src="{{theUser?.picture}}"/>
    </ion-avatar>

    <h2>{{theUser?.login}}</h2>

    <p>{{theUser?.name}}</p>

  </button>

</ion-list>

</ion-content>

Module - home.ts

import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { Http } from '@angular/http';
import { Observable } from 'rxjs';
import { ContactosApiProvider, User } from '../../providers/contactos-api/contactos-api';
import 'rxjs/add/operator/map';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {
  name: Observable<any>;
  myUser: User;

  constructor(public navCtrl: NavController, public contactosApiProvider: ContactosApiProvider) {
      contactosApiProvider.getData().subscribe(newUser => {
        this.myUser = newUser;
      });
    }
}

Pipe - keys.ts

import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
	name: 'keys',
})
export class KeysPipe implements PipeTransform {

	transform(value: any, args?: any[]): any[] {

		if(value) {

			let keyArr: any[] = Object.keys(value),
			dataArr = [];

			keyArr.forEach((key: any) => {
				dataArr.push(key);
			});

			return dataArr;
		}
	}
}


Provider - contactos-api.ts

import { Http, Response } from "@angular/http";
import { Injectable } from '@angular/core';
import 'rxjs/add/operator/map';
import { Observable } from "rxjs";

export class User{
  name: String;
  location: String;
  email: String;
  login: String;
  dob: String;
  registered: String;
  phone: String;
  cell: String;
  picture: String;
  nat: String;

  constructor(name, location, email, login, dob, registered, phone, cell, picture, nat){
    this.name = name;
    this.location = location;
    this.email = email;
    this.login = login;
    this.dob = dob;
    this.registered = registered;
    this.phone = phone;
    this.cell = cell;
    this.picture = picture;
    this.nat = nat;
  }

}


@Injectable()
export class ContactosApiProvider {

  constructor(private http: Http) {
  }

  getData(){
    return this.http.get('https://randomuser.me/api')
    .map((data: Response) => data.json())
    .map(res => {
      return new User(res['results'][0].name.first,
      res['results'][0].location.street,
      res['results'][0].email,
      res['results'][0].login.username,
      res['results'][0].dob,
      res['results'][0].registered,
      res['results'][0].phone,
      res['results'][0].cell,
      res['results'][0].picture.thumbnail,
      res['results'][0].nat);
    });
  }

}


App - app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';
import { HttpModule } from '@angular/http';


import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { DetalhesPage } from '../pages/detalhes/detalhes';
import { ContactosApiProvider } from '../providers/contactos-api/contactos-api';
import { KeysPipe } from '../pipes/keys/keys';

@NgModule({
  declarations: [
    MyApp,
    HomePage,
    DetalhesPage,
    KeysPipe
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp),
    HttpModule
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    HomePage,
    DetalhesPage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    ContactosApiProvider
  ]
})
export class AppModule {}

Ionic Framework: 3.9.2
Ionic App Scripts: 3.1.0
Angular Core: 5.0.0
Angular Compiler CLI: 5.0.0
Node: 6.12.0

Posts: 1

Participants: 1

Read full topic

Can't run ios after updating device to ios 11.1.1

$
0
0

@pe1 wrote:

Trying to run the app:

ionic cordova run ios

im getting the error:

[  0%] Looking up developer disk image
[ 90%] Mounting developer disk image
[ 95%] Developer disk image already mounted
2017-11-10 14:06:40.381 ios-deploy[6973:66494] [ !! ] Error 0xe8000022: The service is invalid. AMDeviceStartService(device, CFSTR("com.apple.debugserver"), &gdbfd, NULL)
Error: Error code 253 for command: ios-deploy with args: --justlaunch,--no-wifi,-d,-b,/Users/artur/sl39/platforms/ios/build/device/MyApp.app

[ERROR] An error occurred while running cordova run ios (exit code 1).

All it happens after updating my iPad to IOS 11.1.1

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.18.0
    ionic (Ionic CLI) : 3.18.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.1.0
    Cordova Platforms  : ios 4.5.3
    Ionic Framework    : ionic-angular 3.9.2

System:

    ios-deploy : 1.9.2
    ios-sim    : 5.0.13
    Node       : v6.10.0
    npm        : 3.10.10
    OS         : macOS Sierra
    Xcode      : Xcode 9.0 Build version 9A235

Posts: 1

Participants: 1

Read full topic

Access the settings menu via an Ionic link

$
0
0

@RadaKeyune33 wrote:

On Facebook when we are offline and we try to log in to it, a message appears saying that we are without Internet and a link written More (like an ActionSheet), if we click on the More it opens the settings of the mobile so we can see network status, such as wifi and mobile network, how could I replicate this in Ionic? * Sorry if there are any errors, I’m using Google Translator *

Posts: 2

Participants: 2

Read full topic

Problem with isDevMode

$
0
0

@diogocaseca wrote:

Hi everyone,

I have a problem with isDevMode, this aways return true. I put the enableProdMode in the main.ts and the isDevMode continued returning true.

Seleção_001

Posts: 1

Participants: 1

Read full topic

Set mock location for Testing of Geo-location based Mobile Apps

$
0
0

@pcloudy wrote:

How many apps on your phone today has applications that need GPS as a tool to do the task that it needs to. Be it hailing a cab, ordering food, booking a movie or the indispensability of shopping online, more often than not, we use GPS based apps all available at our fingertips. Gone are the days when asking people around a few times used to connect you and the place of the product.

Precision is the name of the game now. The applications developed need to be tried and tested. Not just that its functional requirements are easy to read and track format seamlessly.

Geo-Location Testing of Apps by using mock locations on devices

Geo-location technology has given birth to new ideas for startups which didn’t exist before. New market strategies keep bringing to light that have transformed the relationship of a company and its consumers. The ability to integrate Geo-location into our mobile technology creates solution for any industry domain.

Why is testing necessary?

A few examples of Geo-location apps are the ones that also track weather alert systems, track life-stock and location based advertisement systems. Using Geo-Tag or GPS Location of a mobile device, location aware apps are created. Geo-location testing is performed on apps that are location-aware. Which means it has to display and collect information based on the real-time location of the device, to provide real-time services to its user’s proximity.

So how does a developer guarantee that the application will be functional worldwide? Not just that, for local areas, how does he guarantee that the app will work in specific streets with crowded services and neighborhood areas?

Presently the state of affairs are such that Geo-location apps are restricted to field testing and iOS/Android based simulators. Developers can also manually draw up GPX/KML files that need talented coding skills. Test teams have always struggled to test location based feature due to lack of mock location tools.

How does pCloudy allows testing of Geolocation apps?

pCloudy provides single click access to a tool to mock location on a IOS or Android device. Which is why testing geolocation functionalities is also pretty damn seamless and easy.

Similar to field-testing but only far easier. If your application under test is a location aware app and if it reads the geo-location from the device to provide the necessary results, “Set Phone Location” feature can be used to inject any location (mock location) on the earth to the device and the device will be teleported to the selected location. Simply choosing a location of choice on a virtual map, which internally feeds latitude and longitude information to the device.

This emulates the chosen location on the device as your real location. This helps you test if your application behaves properly at different locations.

mobile app testing , mobile application testing , automation testing , mobile app testing tools, mobile app testing platform , mobile responsive test , android app testing , ios app testing , app testing , adb shell commands

Posts: 1

Participants: 1

Read full topic

Keyboard doesn't show when building with --prod on Android Nougat

$
0
0

@arsyad wrote:

I am encountering a weird issue with the keyboard only if I run it using --prod. When the input field is empty, I can tap on it, the keyboard shows and I can start typing. I go to the next field and it works.

However, as soon as I leave the field or if the field is not empty, when I try to make a change by tapping the input field again, the keyboard doesn’t show up. It seems as if it is locked.

It happens for all input types (text, email etc). And only happens if I run with --prod on Android 7 Nougat. If I just do a ionic cordova run android, it works ok.

I tested with Android 5.1 and it seems to work fine. Anyone with the same issue? Or does Ionic not support Android 7?

Here is my ionic info output:

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.18.0
    ionic (Ionic CLI) : 3.18.0

global packages:

    cordova (Cordova CLI) : 7.0.1

local packages:

    @ionic/app-scripts : 2.1.4
    Cordova Platforms  : android 6.2.3
    Ionic Framework    : ionic-angular 3.6.1

System:

    Android SDK Tools : 25.2.5
    ios-deploy        : 1.9.1
    ios-sim           : 3.1.1
    Node              : v6.10.0
    npm               : 4.2.0
    OS                : macOS Sierra
    Xcode             : Xcode 9.0.1 Build version 9A1004

Posts: 1

Participants: 1

Read full topic


Ionic Devapp always white screen

$
0
0

@roundpitt wrote:

Hi,

I tried using an ongoing project within Ionic Devapp. It’s supposed to load your app so you can view it. Except it’s always a blank screen when it loads up my project.

So, I tried making a completely new project with everything updated. I started with a blank project. Then I opened the blank project which is supposed to open to a single page with some text on it. It works in my browser but on in the ionic devapp. Does the DevApp work?

Posts: 1

Participants: 1

Read full topic

altDevApp - experimental customisable alternative to Ionic DevApp

$
0
0

@Tommertom wrote:

Hi

out of curiosity and need for support to more plugins and console.log watching I tried to figure out how to make my own DevApp-app.

And it worked!

  • livereload
  • console.log checking
  • my own repository of plugins
  • storing list of frequently used client endpoints

Well, very experimental, that is… And very insecure as it whitelists all possible webresources to be included.

And no discovery and ionic account login supported (which I don’t need anyway)

Wanted to share this.

Ionic View public app id (plugins don’t work, but testing the link to the ionic serve does, includig livereload in ionic view!!): e120a881

Tom

Posts: 1

Participants: 1

Read full topic

Ionic DevApp net::ERR_ADDRESS_UNREACHABLE issue

$
0
0

@cybentizens wrote:

Hi,

My app was working few minutes ago. I restarted ionic serve and it stopped working with this error.

Webpage not available
The webpage at **http://192.168.8.100:8100/?devapp=true** could not be loaded because:

net::ERR_ADDRESS_UNREACHABLE

How to resolve this issue?

Best Regards

Posts: 1

Participants: 1

Read full topic

Error on http post

$
0
0

@sroby wrote:

Hi,

we’ve some problems posting data to the server with android. This is the error:

{"_body":null,“status”:599,“ok”:false,“statusText”:“Ok”,“headers”:{},“type”:2,“url”:null}

Ionic info:

@ionic/cli-utils : 1.17.0
ionic (Ionic CLI) : 3.17.0

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

@ionic/app-scripts : 3.0.1
Cordova Platforms  : android 6.2.3
Ionic Framework    : ionic-angular 3.7.1

System:

Android SDK Tools : 25.2.5
Node              : v6.11.0
npm               : 3.10.10
OS                : Windows 10

Posts: 1

Participants: 1

Read full topic

Debug with android studio ionic v1, breakpoints not working

$
0
0

@djmaxisauce wrote:

Hi, If I install the app with android studio, it works!
If I run with the bug icon , and I put breakpoints in the code with android studio, the app runs, but the execution doesnt stop on breakpoints.

Any idea ?

I know that I can debug with chrome, I do it. But I am debugging an app installed on a STB with android, and I cant do chrome recognice it as remote device.

Thanks,

Posts: 1

Participants: 1

Read full topic

Base 64 Image encoding

$
0
0

@dyme wrote:

Hello guys :slight_smile:
I would like to encode an image ,taken by device’s camera or uploaded from the libary, in Base 64 file in order to emit it via websocket.
I have tried with this plugin which is in beta stage but it does not work :confused:
Any ideas or help please !?
Thanks in advance.

Posts: 1

Participants: 1

Read full topic

File plugin returns Directory List empty

$
0
0

@rashnk wrote:

in my ionic app I just want to list all the files/folders in sd card, im using the cordova-file-plugin

the code is below

.controller('MyCtrl', function($scope, $cordovaFile) {

  document.addEventListener('deviceready', function () {


  console.log('sdsd');

  var myPath = cordova.file.externalRootDirectory; // We can use the default externalRootDirectory or use a path : file://my/custom/folder

window.resolveLocalFileSystemURL(myPath, function (dirEntry) {
	console.log(dirEntry);
     var directoryReader = dirEntry.createReader();
     directoryReader.readEntries(onSuccessCallback,onFailCallback);
});

function onSuccessCallback(entries){
  console.log( 'The magic will happen here, check out entries with');
   console.log(entries);
}

function onFailCallback(){
  // In case of error
}


  });

});

http://ngcordova.com/docs/plugins/file/ in ngcordova file there is no function i found, so im using cordova javascript code in my ionic app,

The function returns empty array, i hae added the permission also, anyone had similar issue , pls help

Posts: 2

Participants: 1

Read full topic


Error trying to use ionic native plugins

The keyboard pushes a div up & out of the screen

$
0
0

@Morxander wrote:

I’m using Ionic 3 to make a website which will be part of another native app in a webview so I don’t user cordova or any native plugins.
I have a form with an embedded Google Map View above the elements and here is my HTML :

<div  style="height: 40%; width: 100%">
  <div id="map_loader" *ngIf="showMapLoader">
    <div class="sk-wave">
      <div class="sk-rect sk-rect1"></div>
      <div class="sk-rect sk-rect2"></div>
      <div class="sk-rect sk-rect3"></div>
      <div class="sk-rect sk-rect4"></div>
      <div class="sk-rect sk-rect5"></div>
    </div>
  </div>
  <div #mapCanvas style="width: 100%; height: 100%;"></div>
</div>
<form (ngSubmit)="submit()" padding>
  <ion-list>
......
......
.....
  </ion-list>
</form>

and here is my CSS :

  #map_loader {
    margin:auto;
    background-color: rgba(0, 0, 0, 0.5);
    width: 100%;
    height: 100%;
    z-index: 1000;
    position: absolute;
  }

  .scroll-content {
    top: 38%;
    position: absolute;
    margin-top: 32px;
  }

Now once the user open the website on his phone and start filling the form the keyboard shifts the map out of the screen ( Up ) and it stays that way and a blank empty space shows bellow the form.

Am I doing it right? Is that happening because of my CSS? and what is the best way to make a div takes a specific percentage of the screen height? I tried ion-grid but it seems that it can’t help me for this case.

Posts: 1

Participants: 1

Read full topic

Can I use Typescript 2.4.2 with Ionic 3.8.0

How to handle prompt alerts in ionic native

$
0
0

@champion007 wrote:

Requirement - user confirmation for otp sent i am giving option for user to resend the otp for second time until user exceeds the counts i dont want to close the prompt alert. here is my code -

let prompt = this.alertCtrl.create({
      title: 'Verification',
      enableBackdropDismiss: false,
      inputs: [
        {
          name: 'otp confirmation',
          placeholder: 'Enter one time password',
          type: "tel",
          id: "confrminput",

        },
      ],
      buttons: [
        {
          text: 'Re-send OTP',
          handler: data => {
            //How to handle here
          }
        },
        {
          text: 'Confirm',
          handler: data => {
            //confirmed - if wrong how to handle without closing the prompt alert.

          }
        }
      ],
    message: "Please enter 6 digit OTP code sent to your mobile number",
    });

    prompt.present();
  }

Posts: 1

Participants: 1

Read full topic

Proper way to create ionic + electron application

$
0
0

@Madm0x wrote:

There is some tutorials on the web, some copy the www rep, others add electron dep … but there is no ‘official’ way of how to create an Electron app based on ionic.

Posts: 1

Participants: 1

Read full topic

Viewing all 70445 articles
Browse latest View live


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