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

net::ERR_CONNECTION_REFUSED (http://localhost:8080/)

$
0
0

@pclavequin wrote:

Hello,

I face the same problem with some devices having Android 4.4.2. My ionic info is:

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

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0 

local packages:

@ionic/app-scripts : 3.1.11
Cordova Platforms  : android 7.1.1 browser 5.0.3 ios 4.5.5
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 25.2.5
ios-deploy        : 1.9.2 
Node              : v8.11.2
npm               : 5.6.0 
OS                : macOS High Sierra
Xcode             : Xcode 9.4.1 Build version 9F2000 

Environment Variables:

ANDROID_HOME : /usr/local/Cellar/android-sdk/24.1.2/

Misc:

backend : pro

Posts: 5

Participants: 2

Read full topic


Can we get an Ionic-v-4 category?

Question regarding Ionic 4

Change the css of a dynamically generated element

$
0
0

@kimi21 wrote:

I have a dynamically generated element in my ionic 3 tab application. I want to get access to that element in one of my pages and hide it. Any ideas how to do it?

Posts: 1

Participants: 1

Read full topic

How to make slides such as story of snapchat?

$
0
0

@_Ali94 wrote:

I’m trying to make something like story of snapchat with slides

image example:
Capture

but i have small problem when I swipe to the end of slides, my design shown such as this:
Capture

Here my html code:

<ion-slides style="height:auto; width:100%;" spaceBetween="-15">
		<ion-slide style="padding:15px; padding-bottom:0px; max-width:95px;" *ngFor="let s of slides" >
			<div style="">
				<div style="margin:0 auto; width:65px; height:65px; border:1px solid black; border-radius:50px; background-color:green;">
				</div>
				<p text-center style="font-size:13px;">{{s.title}}</p>
			</div>
		</ion-slide>
	</ion-slides>
<ion-list no-lines>

Note: I don’t want to make specific number of slides per view by using "slidesPerView"

Posts: 2

Participants: 1

Read full topic

Questions about cordova-plugin-ionic-webview

$
0
0

@chrisbrody wrote:

I just learned about cordova-plugin-ionic-webview, was wondering about the following:

  • What kinds of needs motivated cordova-plugin-ionic-webview?
  • What kind of native WebView classes are used on iOS & Android?
  • How does it compare to popular alternatives such as cordova-plugin-wkwebview-engine and builtin UIWebView?
  • How actively is cordova-plugin-ionic-webview maintained?

It was also not clear to me which category I should have used for this question.

Some related topics for reference:

Posts: 1

Participants: 1

Read full topic

Import problem after v4 update

$
0
0

@MrWhite wrote:

Hi, I just started to migrate my ionic 3 application to ionic 4, but during the ionic serve process, I got some incompatibility errors with several packages:

[ng] ERROR in node_modules/@ionic-native/google-maps/index.d.ts(2,10): error TS2305: Module '"C:/programming/studay/node_modules/rxjs/Observable"' has no exported member 'Observable'.
[ng] node_modules/@ionic-native/in-app-browser/index.d.ts(2,10): error TS2305: Module '"C:/programming/studay/node_modules/rxjs/Observable"' has no exported member 'Observable'.
[ng] node_modules/@ionic-native/onesignal/index.d.ts(2,10): error TS2305: Module '"C:/programming/studay/node_modules/rxjs/Observable"' has no exported member 'Observable'.
[ng] node_modules/ionic2-calendar/calendar.service.d.ts(1,10): error TS2305: Module '"C:/programming/studay/node_modules/rxjs/Observable"' has no exported member 'Observable'.
[ng] node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.
[ng] node_modules/rxjs/operators/catchError.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/operators/catchError'.
[ng] node_modules/rxjs/operators/map.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/operators/map'.

I don’t know if I do something wrong or if ionic native have some errors of RxJS operator ?

My package.json

"@ionic-native/google-maps": "^4.9.1",
    "@ionic-native/in-app-browser": "4.11",
    "@ionic-native/onesignal": "4.11",

4.11.0 is the latest version

Posts: 3

Participants: 2

Read full topic

What is the best practice to store push notifications?

$
0
0

@jraspante wrote:

I’m new on Ionic and I’m developing an app that has a notification page. The user will receive push notifications and the app must store all push notifications that it has been received. The app will also show a list of all read/unread notifications and change this status when the user reads the message.

I’m thinking to use the SQLite plugin and create methods to select an specific notification, all notifications, and an alter method to change the status read/unread.

Am I on the right way or there is a best practice to do it?

Posts: 2

Participants: 2

Read full topic


Center ion-buttons

$
0
0

@TheAwesome wrote:

Hello, is it possible to enter buttons inside ion-buttons in navbars or toolbars?

I would like to make sure that the title remains on the left and the buttons (which open pages) completely in the center, but I do not know just how to do it. Thank you for your answers in advance.

Posts: 1

Participants: 1

Read full topic

Soap request using ionic # and c#

$
0
0

@remilkr wrote:

Can anybody please help to connect to this api?
I couldnot connect to this. Please helpme

Following is the soap request and response

POST /food_app/foodApp.asmx HTTP/1.1
Host: 10.0.0.111
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: “http://tempuri.org/catDetails

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”>
soap:Body

string

</soap:Body>
</soap:Envelope>

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”>
soap:Body

</soap:Body>
</soap:Envelope>

Posts: 1

Participants: 1

Read full topic

Bluetooth SPP

$
0
0

@enfix wrote:

Hi,
i’m trying to create a simple monitor app to exchange message from Arduino and smartphone.
I’m using https://ionicframework.com/docs/native/bluetooth-serial.
Is it possible to test my app without the hardware simulating message from computer ?
I’m using mac and I tried to use BluTerm, but when I select my phone it say there are no necessary service, how can I test my app ?
Anyone has used this library ?

Posts: 1

Participants: 1

Read full topic

Ionic2 Android application increse badge counter from payload with receiving push notification

$
0
0

@lado wrote:

Hello,

I’m trying to get and increase badges over the app icon with receiving of push notification, here is my home.ts with message and get request:

   var mess = {
      message: messTxt,
      title: tit,
      subtitle: 'Museit',
      tickerText: 'Museit Notification',
      vibrate: '1',
      sound: '1',
      badge: '1',
      largeIcon: 'large_icon',
      smallIcon: 'small_icon'
    }

    this.http.get(this.phpPathTok + 'sendPushNotification.php?token=' + tok + '&msg=' + JSON.stringify(mess))
      .map(res => res.json())
      .subscribe(data => {
        console.log(data);
      }, err => {
        console.log("Oops!", err);
      }
   );

My server side php based on this example, which uses Firebase API_ACCESS_KEY.

I am sending a JSON.stringify(mess) to php. Then with receiving of push notification in app.components.ts with initPushNotification();:

initPushNotification() {
    this.push.hasPermission()
      .then((res: any) => {
        if (res.isEnabled) {
          console.log('We have permission to send push notifications');
        } else {
          console.log('We don\'t have permission to send push notifications');
        }
      });
    const options: PushOptions = {
      android: {
        senderID: 'my sender id'
      },
      ios: {
        alert: 'true',
        badge: true,
        sound: 'false'
      },
      windows: {}
    };
    const pushObject: PushObject = this.push.init(options);
    pushObject.on('notification').subscribe((notification: any) => {
      if (notification.additionalData.foreground || notification.additionalData.background) {
        console.log('Received a notification', notification);
        let confirmAlert = this.alertCtrl.create({
          title: 'New Notification',
          message: notification.message,
          buttons: [{
            text: 'Ignore',
            role: 'cancel'
          }, {
            text: 'View',
            handler: () => {
              this.nav.push(DetailsPage, { message: notification.message });          
            }
          }]
        });
        confirmAlert.present();
      }
    });
    pushObject.on('registration').subscribe((registration: any) => {
      console.log('Device registered', registration);
      var t = registration.registrationId;
      this.saveDeviceToken(t);
    });
    pushObject.on('error').subscribe(error => console.error('Error with Push plugin', error));
  }

in result I got desired badge counter circle over the app icon with receiving push notification, but with receiving of second notification counter number is still 1.

What value I have to increase with +1 for each received notification, instead of this.badgeNumber; variable in code below, which works only in foreground with this.increaseBadges(this.badgeNumber); in initPushNotification();?

badge: '1', of payload comes from the sender as fixed number, how to use it?

It looks like, code below does not participates in process at all:

 async requestPermission() {
    try {
      let hasPermission = await this.badge.hasPermission();
      console.log(hasPermission);
      if (!hasPermission) {
        let permission = await this.badge.requestPermission();
        console.log(permission);   
      }
    } catch (e) {
      console.error(e);
    }
  }

   async increaseBadges(badgeNumber: number) {
    try {
      let badge = await this.badge.increase(badgeNumber);
      console.log("Badge notification counter: ", badge);
      this.badgeNumber = badge;
      var badgeAmount = badge;
      this.setBadges(badgeAmount);
    } catch (e) {
      console.log(e);
    }
  }

  async setBadges(badgeAmount: number) {
    try {
      let badges = await this.badge.set(badgeAmount);
      console.log("Set badges: ", badges);
      this.out = badges;
      this.getBadges()
    } catch (e) {
      console.log(e);
    }
  }

  async getBadges() {
    try {
      let badgeAmount = await this.badge.get();
      console.log("Get badges amount: ", badgeAmount);
      this.out = badgeAmount;
    } catch (e) {
      console.log(e);
    }
  }

Posts: 1

Participants: 1

Read full topic

Ionic Storage dont work DEVAPP IOS

$
0
0

@alfenas wrote:

I’m using ionic storage to save some login, user and token data, but testing on the web browser works fine, now when I’m using DEVAPP it only works on android, on the iphone it hangs up the device.
Has anyone ever experienced this??
thank you

if (retornoAPI.Codigo == '0') {
          this.storage.set('dadosUsuario', retornoAPI.Objeto ).then( () => {
            this.navCtrl.setRoot(HomePage);
          },
            error => alert('Problemas ao efetuar login.')
          ); 

Posts: 1

Participants: 1

Read full topic

Communication between 2 applications

$
0
0

@Jerry29 wrote:

Hi

I have 2 applications. I want to show a specific page in App2 on a click event from App1.
How can I achieve this?

Someone guide me, please.

Thanks

Posts: 1

Participants: 1

Read full topic

Download ionic packets, using proxy

$
0
0

@alfenas wrote:

in the company where I work we have a proxy server, I configured npm with the company proxy, it works perfect, after that, I configured the proxy session variables for the ionic:
set http_proxy = [proxy server]: [proxy port]
set https_proxy = [proxy server]: [proxy port]

but it is not working yet, when I install an Ex component : $ ionic cordova plugin add cordova-plugin-nativestorage

the console hangs for several minutes, after that, the package is downloaded through npm, is there any other way to configure the proxy in ionic ??
thank you

Posts: 1

Participants: 1

Read full topic


Ion-datetime binding through ngModel ionic-v4

$
0
0

@anupzone wrote:

i am binding through ngModel. but variable returning always undefined. i am using ionStyle event.

<ion-item class="itemdiv">
        <ion-label class="modtitle" position="floating">First Contact</ion-label>
        <ion-datetime display-format="DD/MM/YYYY" id="dat" [(ngModel)]="myDate" (ionStyle)="showdate()"></ion-datetime>
      </ion-item>
export class ModaldetailPage{
public myDate;

constructor( ) { }

showdate(){
    console.log(this.myDate);
  }

33%20am

Posts: 1

Participants: 1

Read full topic

Iframes Don't display in iOS devices when tested using Xcode

$
0
0

@akaruppur2021 wrote:

I used the ionic cordova build ios --prod command to build an Xcode project. When I run the project, none of the iFrames load, even when I try whitelisting the websites from within config.xml (adding the <allow-navigation href="*">.

Posts: 1

Participants: 1

Read full topic

After build app and louch I got ERR_CONNECTION

$
0
0

@dhy wrote:

why this problem??
after build app and louch I got ERR_CONNECTION
err

and app cannot open directly closed :tired_face:

this my.config

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.aplikasi.app" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>aplikasi</name>
    <description>Kemudahan dalam genggaman.</description>
    <author email="aplikasi.enterprise@gmail.com" href="http://aplikasi.com/">aplikasiIT</author>
    <content original-src="index.html" src="http://192.168.1.9:8100" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <preference name="ScrollEnabled" value="false" />
    <preference name="android-minSdkVersion" value="19" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="300" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="3000" />
    <preference name="AutoHideSplashScreen" value="false" />
    <preference name="FadeSplashScreen" value="false" />
    <preference name="loadUrlTimeoutValue" value="900000" />
    <platform name="android">
        <allow-intent href="market:*" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
        <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
        <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
        <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
        <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
        <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
        <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
        <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
        <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
        <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
        <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
        <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
        <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
        <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
        <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
        <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
        <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
    </platform>
    <plugin name="cordova-plugin-whitelist" spec="1.3.3" />
    <plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
    <plugin name="cordova-plugin-ionic-webview" spec="^2.0.0" />
    <plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
    <plugin name="cordova-plugin-fcm-with-dependecy-updated" spec="^2.2.4" />
    <plugin name="cordova-plugin-printer" spec="^0.7.3" />
    <plugin name="cordova-plugin-bluetooth-serial" spec="^0.4.7" />
    <plugin name="cordova-plugin-device" spec="^2.0.2" />
    <plugin name="com.telerik.plugins.nativepagetransitions" spec="^0.6.5" />
    <plugin name="cordova-plugin-contacts" spec="^3.0.1" />
    <plugin name="cordova-plugin-datepicker" spec="^0.9.3" />
    <allow-navigation href="*" />
    <allow-navigation href="http://localhost*" />
    <allow-navigation href="http://localhost:8080/" />
    <plugin name="phonegap-plugin-barcodescanner" spec="^8.0.0">
        <variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" />
    </plugin>
    <plugin name="cordova-sqlite-storage" spec="^2.3.3" />
    <allow-navigation href="http://192.168.1.11:8100" />
    <allow-navigation href="http://192.168.1.6:8100" />
    <allow-navigation href="http://192.168.1.9:8100" />
    <engine name="android" spec="7.0.0" />
    <engine name="browser" spec="5.0.3" />
</widget>

Posts: 1

Participants: 1

Read full topic

TypeError: Cannot read property 'call' of undefined

$
0
0

@Gatonieves wrote:

errorapp
hello friends recently I get this error “Uncaught TypeError: Can not read property ‘call’ of undefined”, I have no idea what it is but it is very strange because it occurs at any time, please help!

Posts: 1

Participants: 1

Read full topic

Sometimes stuck on first page and 'waiting for localhost'

$
0
0

@davidvalen95 wrote:

im aware this start happening after i install ionic storage

so its sometimes stuck on first page both on device or web it shows waiting for localhost

then i try to open localhost:8100 in new page and everything is fine

code (console.log) never pass await of storage.get() in async function…

anyone with this?

Posts: 1

Participants: 1

Read full topic

Viewing all 49268 articles
Browse latest View live


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