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

I have integrated rtmp streaming media in an ionic application but video is not playing

$
0
0

@Akarsh12 wrote:

I m building an ionic application where I am trying to integrated live streaming into my app using rtmp stream. It will open the player but the Video is not playing.
Here is my code:

import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
@IonicPage()
@Component({
selector: 'page-media',
templateUrl: 'media.html',
})
export class MediaPage {

  constructor() { 
   }

 start(){
 alert("start video");

  (<any>window).videoStreamer.streamRTMP
 ('rtmp://103.130.188.26:1935/ntv/live/live1',alert('success'), 

 alert('failed')).onConnectionSuccess((data)=>alert(data))
 .onError((data)=>alert(data));

  }
 }

Posts: 1

Participants: 1

Read full topic


Rxjs/internal/types.d.ts error

$
0
0

@woonmar wrote:

I was trying to build chat app and successfully did it. But when i ran ionic cordova build android i got the following error.

[app-scripts] [14:46:38]  ionic-app-scripts 3.2.1
[app-scripts] [14:46:38]  watch started ...
[app-scripts] [14:46:38]  build dev started ...
[app-scripts] [14:46:38]  clean started ...
[app-scripts] [14:46:38]  clean finished in 9 ms
[app-scripts] [14:46:38]  copy started ...
[app-scripts] [14:46:39]  deeplinks started ...
[app-scripts] [14:46:39]  deeplinks finished in 53 ms
[app-scripts] [14:46:39]  transpile started ...
[app-scripts] [14:46:44]  typescript: E:/Ionic/retail/node_modules/rxjs/internal/types.d.ts, line: 81
[app-scripts]             ';' expected.
[app-scripts]       L81:  export declare type ObservedValueOf<O> = O extends ObservableInput<infer T> ? T : never;
[app-scripts] [14:46:44]  typescript: E:/Ionic/retail/node_modules/rxjs/internal/types.d.ts, line: 81
[app-scripts] [14:46:44]  typescript: E:/Ionic/retail/node_modules/rxjs/internal/types.d.ts, line: 81
[app-scripts]             ';' expected.
[app-scripts]       L81:  export declare type ObservedValueOf<O> = O extends ObservableInput<infer T> ? T : never;
[app-scripts]             Expression expected.
[app-scripts]       L81:  export declare type ObservedValueOf<O> = O extends ObservableInput<infer T> ? T : never;
[app-scripts]             'ObservableInput' only refers to a type, but is being used as a value here.
[app-scripts] [14:46:44]  typescript: E:/Ionic/retail/node_modules/rxjs/internal/types.d.ts, line: 81
[app-scripts] [14:46:44]  typescript: E:/Ionic/retail/node_modules/rxjs/internal/types.d.ts, line: 81
[app-scripts] [14:46:44]  typescript: E:/Ionic/retail/node_modules/rxjs/internal/types.d.ts, line: 81
[app-scripts]       L81:  export declare type ObservedValueOf<O> = O extends ObservableInput<infer T> ? T : never;
[app-scripts]             Cannot find name 'infer'.
[app-scripts]       L81:  export declare type ObservedValueOf<O> = O extends ObservableInput<infer T> ? T : never;
[app-scripts]             Cannot find name 'T'.
[app-scripts]       L81:  export declare type ObservedValueOf<O> = O extends ObservableInput<infer T> ? T : never;
[app-scripts]             Cannot find name 'T'.
[app-scripts]       L81:  export declare type ObservedValueOf<O> = O extends ObservableInput<infer T> ? T : never;
[app-scripts]             'never' only refers to a type, but is being used as a value here.
[app-scripts]       L81:  export declare type ObservedValueOf<O> = O extends ObservableInput<infer T> ? T : never;
[app-scripts] [14:46:44]  typescript: E:/Ionic/retail/node_modules/rxjs/internal/types.d.ts, line: 81
[app-scripts] [14:46:44]  typescript: E:/Ionic/retail/node_modules/rxjs/internal/types.d.ts, line: 81

Posts: 1

Participants: 1

Read full topic

Dependency of two firebase "tables"

$
0
0

@Broccoli38 wrote:

Hello everybody,

in list.ts i am trying to connect to two tables of my database with angular fire:

itemListRef$: Observable;
profileListRef$: Observable;
item = {} as Item;
profile = {} as Profile;

constructor(public navCtrl: NavController, private database: AngularFireDatabase,
public alertCtrl: AlertController,) {

this.itemListRef$ = this.database.list(`/item`).valueChanges();
this.itemListRef$.subscribe(task => this.item = item);  
this.profileListRef$ = this.database.list(`/profile/${this.item.userID}`).valueChanges();
this.profileListRef$.subscribe(profile => this.service = profile); 

}

In table “item” is the information about profile key saved. With this key I want get the information like username or review from “profile”.
How can I get the data from the “profile” table with the user information from the table “item”?

Is something like this possible?

{{profile.(item.userID).username}}

Posts: 1

Participants: 1

Read full topic

Ionic v4: Change active tab dynamically

$
0
0

@mavillavishnu wrote:

Hello everyone. Require your help. I am using Ionic V4 to develop an app. It has a tabs page with four tabs in it. I have a button in Tab1 and on click it should change the tab to second tab.
Sorry if i was not clear but please help me.

Posts: 2

Participants: 2

Read full topic

Build apk from user input

$
0
0

@sarathunrelax wrote:

Hey,

I’m new to Ionic, Is it possible to build apk by getting values from user ?

For Example : I need to build webview app by accepting values like appname,splash,icon,url from the user , once they click build button from user interface i need to build the app automatically from my server with that details and show download link to download the apk ?

Can you share some ideas ?

Posts: 1

Participants: 1

Read full topic

Iframe reloads again if focused out in Ionic 3

$
0
0

@setu1421 wrote:

I am working on an Ionic 3 application. Inside a div, i am loading an external url in an iframe and it is loading perfectly. But it creates problem when focuses out. The iframe reloads every time when it focuses out.

Scenario-01: In the page where i have loaded the iframe, there are other controls outside of the iframe such as a text box to enter some data. So, when i click on the textbox, the keyboard appears but at the same time iframe reloads again.

Scenario-02: I have one menu sliding drawer from left in the application. When i open the sliding drawer to select another page, i could see the iframe of the existing page reloads again.

Scenario-03: The external url that i have loaded in the iframe has some input controls. So, i want to enter something in those input boxes, the keyboard appears but at the same time iframe gets reloaded and i could not provide any data in those input boxes.

From my assumption, iframe is causing problems when it focuses out. So, i tried to capture the blur event of that iframe and try to stop the propagation of the event.

<iframe width="100%" height="100%" [src]="url| safeHtml:'resourceUrl'" (ionBlur)="checkBlur($event)" (ionFocus)="checkFocus($event)"></iframe> 

But, both ionFocus and ionBlur events were not triggering.

For now, when i tried with Android application, all the scenarios trigger iframe reload. As keyboard does not appears in browser, when i tried with Browser, only Scenario-02 triggers iframe reload.

Iframe should load at the first time only. Then user can do whatever operations inside the iframe or outside the iframe but the iframe should not load again.

How to stop reloading the iframe if it focuses out by keyboard or sliding drawer or anything?

Posts: 1

Participants: 1

Read full topic

Using async await on function with http post in it

$
0
0

@Vartex05 wrote:

Hi, i have a function, which checks, if the url from input is correct url of api, that my app is communicating with. Code looks like this :

 checkCorrectUrl(url){
   return new Promise(resolve => {
     let headers = new Headers();
     headers.append('Content-Type', 'text/xml;charset=utf-8');
     headers.append('SOAPAction', '.....');
     var body = '.......';
     this.http.post(url+"/atws.asmx", body, {headers: headers}).timeout(3000).subscribe(data => {
         resolve(true);
       },(err)=>{
       resolve(false);
     });
   });
 }

I want to refactor it using async await, to make it cleaner, but somehow, it doesnt work. i tried it like this

  async checkCorrectUrl(url){
      let headers = new Headers();
      headers.append('Content-Type', 'text/xml;charset=utf-8');
      headers.append('SOAPAction', '....');
      var body = '.....';
      await this.http.post(url+"/atws.asmx", body, {headers: headers}).timeout(3000).toPromise().then(data => {
        return true;
        },(err)=>{
        return false;
      });
  }

but it doesnt wait for the http post and resolves … Any ideas what am i doing wrong?

Posts: 1

Participants: 1

Read full topic

Ionic is loading wrong pages without giving any routes

$
0
0

@Gazoh wrote:

So i made a couple pages ‘Settings’, ‘Vragen’, ‘getting-started’, ‘create-account’ so i’ve set my router in

app.component.ts

to my ‘Getting-started’ page and the first thing ionic does is load SettingsPage and than the ‘Getting-started’ page. and whenever i delete that whole page because i though maybe i did something wrong and this time it loaded ‘Vragen’ Page and so. What am i doing wrong?

this is my tabs router:

import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {TabsPage} from './tabs.page';
import {SettingsPage} from '../settings/settings.page';

const routes: Routes = [
    {
        path: 'tabs',
        component: TabsPage,
        children: [
            {
                path: 'tab1',
                children: [
                    {
                        path: '',
                        loadChildren: '../tab1/tab1.module#Tab1PageModule'
                    }
                ]
            },
            {
                path: 'tab2',
                children: [
                    {
                        path: '',
                        loadChildren: '../tab2/tab2.module#Tab2PageModule'
                    }
                ]
            },
            {
                path: 'tab3',
                children: [
                    {
                        path: '',
                        loadChildren: '../tab3/tab3.module#Tab3PageModule'
                    }
                ]
            },
            {
                path: 'settings',
                children: [
                    {
                        path: '',
                        loadChildren: '../settings/settings.module#SettingsPageModule'
                    }
                ]
            },
        ]
    },
    {
        path: '',
        redirectTo: '/tabs/tab1',
        pathMatch: 'full'
    }
];

@NgModule({
    imports: [
        RouterModule.forChild(routes)
    ],
    exports: [RouterModule]
})
export class TabsPageRoutingModule {
}

my router links in tab1 page

<ion-header>
    <ion-toolbar>
        <ion-title>
            <span class="alignTitelLeft">Timeline</span>
            <ion-badge class="hoeveelVragen" color="transparent" routerLink="/vragen" routerDirection="forward">1</ion-badge>
            <div class="titleIcons" routerLink="/vragen" routerDirection="forward">
                <i class="fas fa-comment-alt"></i>
            </div>
        </ion-title>
    </ion-toolbar>
</ion-header>

my app.module.ts

import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {RouteReuseStrategy} from '@angular/router';

import {IonicModule, IonicRouteStrategy} from '@ionic/angular';
import {SplashScreen} from '@ionic-native/splash-screen/ngx';
import {StatusBar} from '@ionic-native/status-bar/ngx';
import { Geolocation } from '@ionic-native/geolocation/ngx';
import { LocationAccuracy } from '@ionic-native/location-accuracy/ngx';

import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
import {SettingsPageModule} from './settings/settings.module';
import {VragenPageModule} from './vragen/vragen.module';
import { HttpClientModule } from '@angular/common/http';


@NgModule({
    declarations: [AppComponent],
    entryComponents: [],
    imports: [
        BrowserModule,
        HttpClientModule,
        IonicModule.forRoot({
            mode: 'md'
        }),
        SettingsPageModule,
        VragenPageModule,
        AppRoutingModule,
    ],
    providers: [
        StatusBar,
        SplashScreen,
        Geolocation,
        LocationAccuracy,
        {provide: RouteReuseStrategy, useClass: IonicRouteStrategy}
    ],
    bootstrap: [AppComponent]

})
export class AppModule {
}

i’ve removed the app.component.ts routerlink to ‘Getting-started’ page because i want to fix this first

Posts: 1

Participants: 1

Read full topic


Ionic display 3rd-party-licenses

$
0
0

@Dovel wrote:

How to display all 3rd-party-licenses used in Ionic by NPM and Native Plugins, etc?
In native Angular it generates a file 3rdpartylicenses.txt to the dist folder. But not in Ionic.
Ionic should generate such file to comply with the law of copyright licenses.

Posts: 1

Participants: 1

Read full topic

ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'listeners' of undefined

$
0
0

@DarylNine wrote:

Hello everyone. I’m having the following error in the browser after building my ionic 3 app.

ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'listeners' of undefined
TypeError: Cannot read property 'listeners' of undefined
    at module.exports.<anonymous> (main.js:520)
    at module.exports.emit (events.js:146)
    at module.exports.ClientRequest._connect (request.js:268)
    at request.js:159
    at t.invoke (polyfills.js:3)
    at Object.onInvoke (core.js:4626)
    at t.invoke (polyfills.js:3)
    at r.run (polyfills.js:3)
    at polyfills.js:3
    at t.invokeTask (polyfills.js:3)
    at Object.onInvokeTask (core.js:4617)
    at t.invokeTask (polyfills.js:3)
    at r.runTask (polyfills.js:3)
    at o (polyfills.js:3)
    at c (polyfills.js:3)
    at polyfills.js:3
    at t.invokeTask (polyfills.js:3)
    at Object.onInvokeTask (core.js:4617)
    at t.invokeTask (polyfills.js:3)
    at r.runTask (polyfills.js:3)
    at o (polyfills.js:3)
defaultErrorLogger @ core.js:1350

Ionic Info

Ionic:

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

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.3, (and 7 other plugins)

System:

NodeJS : v10.15.1 (/usr/local/bin/node)
npm : 6.7.0
OS : macOS High Sierra

PS: The project was initially built on Windows 10 (Working fine) before switching to Mac Os High Sierra.

Posts: 2

Participants: 2

Read full topic

How to use storage-data in Promise? (IONIC4)

$
0
0

@xs2bas wrote:

I’m trying to build a dynamic url using values stored with Storage.

The code on the page I need the data looks like this:

this.remotedataservice.getSectionData('invoice')
        .subscribe(data => {
          this.build(data);
        }, err => {
          console.log(err);
        });

Than the code in the service looks like this:

getSectionData(section): Observable<any> {
    this.storage.get('login').then((login) => {
      this.username = login.username;
    });

    let response = this.http.get('https://www.someurl.com/' + section + '/' +  this.username;
    return response;
  }

When I hard-code the variable (this.username) things work just fine, but using the storage-value doesn’t work.
I know there’t time needed to retrieve the data, but I don’t know how to return the function-return-value within the promise.
Lot’s of things I tried (like returning a new Promise etc.) for hours and hours, but can’t get it to work, so hope someone can help.

Posts: 1

Participants: 1

Read full topic

How to set a root page on ionic 4

$
0
0

@Gazoh wrote:

So what i want is to set a rootPage and not something that is directing me to that page but whenever i start the app it goes to the root page no forwarding. I can’t seem to find it anywhere so could someone maybe help me out?

Posts: 1

Participants: 1

Read full topic

Not able to create app in ionic version 3.20.1 after uninstalling latest ionic 4 version

White screen error

$
0
0

@gTIN wrote:

Uncaught TypeError: Object(…) is not a function
at vendor.js:102989
at Object. (vendor.js:103075)
at webpack_require (vendor.js:55)
at Object.585 (main.js:1097)
at webpack_require (vendor.js:55)
at Object.546 (main.js:999)
at webpack_require (vendor.js:55)
at Object.449 (main.js:984)
at webpack_require (vendor.js:55)
at webpackJsonpCallback (vendor.js:26)
at main.js:1
vendor.js:128037 Ionic Native: deviceready event fired after 7 ms

Posts: 1

Participants: 1

Read full topic

How to show/hide a button based on scroll

$
0
0

@flycoders_sourav wrote:

how to show/hide a button based on a scroll actually i want to do that when any user cross using scroll on this time showing a go to top button how can i do that help me any one
any help would be highly appreciated
Thanks

Posts: 1

Participants: 1

Read full topic


Can't set custom header in httpclient (ionic 3 app angular 5)

$
0
0

@kalpeshkkalekar wrote:

I am trying to use an api which requires an API key ‘Auth’, I am trying to send the key using httpHeaders using below code

getTest(){
let data = {'loginusertype':'12','loginuserid':'51','apitype':'1','start':'0','end':'20'};
let headers = new HttpHeaders({'Content-Type':'application/json; charset=utf-8','Auth':'593eb2c274d640a8798493bf340e08b6'});
this.http.post('http://www.mymediaxchange.com/api/serviceapi/v1/currentworks',data,{headers:headers})
.subscribe(
  (data) => console.log(data),
  (error) => console.log(error)
)  }

But I am not able to set headers the headers are set as below

Posts: 1

Participants: 1

Read full topic

Crop Image with Ionic 3 Camera ( Square => Circle)

Ionic 4 - Works on Android, not on IOS

$
0
0

@Lona wrote:

I´ve got a app that does a simple REST call to a external endpoint. Works well when running ionic serve.

Deploying this on my Android Device it works and it download the data from the endpoint.
Deploying on my Iphone, it does not work and give me the following error:

2019-02-12 23:03:41.229522+0800 rpg-flw-4[606:145510] {"headers":{"normalizedNames":{},"lazyUpdate":null,"headers":{}},"status":0,"statusText":"Unknown Error","url":"<someurl>","ok":false,"name":"HttpErrorResponse","message":"Http failure response for <someurl>: 0 Unknown Error","error":{"isTrusted":true}}

Does this make sense to anyone? Give me some hints to why this would happen?

Posts: 1

Participants: 1

Read full topic

Android Build Dependency Error

$
0
0

@hethcox wrote:

I know very little about android building. I gather that the dependencies but I’m not sure where they’re kept. I couldn’t find them in .m2.

I’m getting this when I try to build my project:

BUILD FAILED in 10s

:app:processDebugResources FAILED

26 actionable tasks: 2 executed, 24 up-to-date

/Users//Development/PurplePanda/purple-panda/platforms/android/gradlew: Command failed with exit code 1 Error output:

Intercom Android Error: Build config compile has dependency: com.google.firebase:firebase-core:10.2.6

The Intercom SDK requires version 11.4.x or higher of this dependency.

Check your plugins to see if any of them are bringing in this dependency

Intercom Android Error: Build config compile has dependency: com.google.firebase:firebase-messaging:10.2.6

The Intercom SDK requires version 11.4.x or higher of this dependency.

Check your plugins to see if any of them are bringing in this dependency

Intercom Android Error: Build config compile has dependency: com.google.firebase:firebase-analytics:10.2.6

The Intercom SDK requires version 11.4.x or higher of this dependency.

Check your plugins to see if any of them are bringing in this dependency

Intercom Android Error: Build config compile has dependency: com.google.firebase:firebase-analytics-impl:10.2.6

The Intercom SDK requires version 11.4.x or higher of this dependency.

Check your plugins to see if any of them are bringing in this dependency

Intercom Android Error: Build config compile has dependency: com.google.firebase:firebase-iid:10.2.6

The Intercom SDK requires version 11.4.x or higher of this dependency.

Check your plugins to see if any of them are bringing in this dependency

Intercom Android Error: Build config compile has dependency: com.google.firebase:firebase-common:10.2.6

The Intercom SDK requires version 11.4.x or higher of this dependency.

Check your plugins to see if any of them are bringing in this dependency

Intercom Android Error: Build config compile has dependency: com.google.android.gms:play-services-tasks:10.2.6

The Intercom SDK requires version 11.4.x or higher of this dependency.

Check your plugins to see if any of them are bringing in this dependency

Intercom Android Error: Build config compile has dependency: com.google.android.gms:play-services-basement:10.2.6

The Intercom SDK requires version 11.4.x or higher of this dependency.

Check your plugins to see if any of them are bringing in this dependency

Intercom Android Error: Build config compile has dependency: com.android.support:support-v4:25.2.0

The Intercom SDK requires version 27.x or higher of this dependency.

Check your plugins to see if any of them are bringing in this dependency

Intercom Android Error: Build config compile has dependency: com.android.support:support-media-compat:25.2.0

The Intercom SDK requires version 27.x or higher of this dependency.

Check your plugins to see if any of them are bringing in this dependency

/Users//.gradle/caches/transforms-1/files-1.1/appcompat-v7-28.0.0.aar/e9851898e1bdef4d6f648a318af091c3/res/values-v28/values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.

Posts: 1

Participants: 1

Read full topic

Router navigation not working after first time

$
0
0

@riteshrajoria wrote:

Is there an issue with the routerLink attribute?
It only works once and then stops working. Here is my code snippet from my Home Page –

        <ion-card routerLink="details" routerDirection="forward">
          <ion-card-content text-center>
            <ion-icon name="information" size="large"></ion-icon>
            <p>Details</p>
          </ion-card-content>
        </ion-card>

The link works fine the first time, and I am successfully navigating to my details page. Then on Details page I can using the and that too works fine.

However, once I come back to the Home page from the Details page, using the back-button; the router link stops working.
This is similar to the issue described here – https://github.com/ionic-team/ionic/issues/16534

Is it still an open issue? Any way to fix it?

Posts: 1

Participants: 1

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>