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

Accordion list and popover component

$
0
0

@istvanszabo20 wrote:

Hi there!

I desperately turn to you guys, since I tried to create an accordion list in many different ways, even by using Simon’s accordion list tutorial video for Ionic 4, but no result, yet.
Firstly, I kindly ask you whether anybody has ever tried to add an accordion list into a popover component?
Secondly, if yes, can you please what can I do wrong by pulling the data from json file into my component html page?
Thank you guys your advices in advance!!

Posts: 1

Participants: 1

Read full topic


Appflow Updates are large when releasing updated builds

$
0
0

@EuanDScott wrote:

Hey all

So I have a project for a client that is an internal business app. This app is not being uploaded to the Play store so all updates are to be released using Appflow (Large version updates we will do manually when the time comes).

The trouble that I am having is that when I release updates, rather than downloading the changed files it seems to be re-downloading the whole app. 700+ files in total. A colleague of mine is also using Appflow in a project that he is working on and is able to only download the updates files. From our testing, it was only the 1 file that was changed. We have tried to figure out what the problem is on my project, but to no avail.

The best that I have been able to do is reduce the downloaded files from the original 800+ to 700+ based on information from the following forum post: Ionic pro live deploy: slow launching time except when initial launch from playstore/appstore.

I have consulted stack overflow and the Ionic forums with little success and tried opening a support ticket with Ionic, but the companies paid tier is not high enough :slightly_frowning_face: .

Has anybody encountered this before and how did they fix it?

Any help would be much appreciated.

Posts: 1

Participants: 1

Read full topic

String interpolation don't work

$
0
0

@darkhatglass wrote:

hi, i start a new App with ionic 5,

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { IonicModule, NavController } from '@ionic/angular';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';

import { HomePage } from './home.page';

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
    RouterModule.forChild([
      {
        path: '',
        component: HomePage
      }
    ])
  ],
  declarations: [HomePage]
})
export class HomePageModule {
echo : string = 'salut';
public Articles : any[];
  constructor(public navCtrl: NavController){
    this.Articles = [
      {nom : 'Télévision', prix : 145},
      {nom : 'Téléphone', prix : 65},
      {nom : 'Sac à dos', prix : 44},
      {nom : 'PC', prix : 84},
    ];
    console.log(this.echo);
    console.log(this.Articles);
  }  
}

when i try to show variables in template file, string interpolation don’t work

<ion-header>
  <ion-toolbar>
    <ion-title>
      App shopping
    </ion-title>
  </ion-toolbar>
</ion-header>

<ion-content padding>
  <ion-label>{{echo}}</ion-label>
  <p>c'est ici que seront affichés les articles à vendre! {{ echo }}</p>
  <ul *ngFor="let article of Articles">
    <li>{{ article.nom }} -- {{ article.prix }}</li>
  </ul>
</ion-content>

<ion-footer>
  <ion-toolbar>
    <ion-title class="monFooter">Je suis un pieds de page</ion-title>
  </ion-toolbar> 
</ion-footer>

please help me!

Posts: 1

Participants: 1

Read full topic

Google drive api on IONIC

$
0
0

@dunghoang69 wrote:

Hi there.
I tried to implement google drive API follow this page : https://hintdesk.com/2018/08/24/angular-google-drive-api-example/

I started with:

 gapi.load('client:auth2', () => {
            return gapi.client.init({
                apiKey: API_KEY,
                clientId: CLIENT_ID,
                discoveryDocs: DISCOVERY_DOCS,
                scope: SCOPES,
            }).then(() => {                   
                this.googleAuth = gapi.auth2.getAuthInstance();
                resolve();
            });
        });

then i signed by:

   this.googleAuth.signIn({
        prompt: 'consent'
    }).then(function() => {
        // use the api
  });

Every thing ok on ionic browser.
But when i run it on my android device, the status bar always load. I can’t get access token.

Anyone else know how to solve this problem. I 'll be very appreciate with your help.

Posts: 1

Participants: 1

Read full topic

Touch not working on android when using splashscreen

$
0
0

@wmjoers wrote:

Hi all!

I’m trying to solve and issue when building for Android using Ionic v4.

I’m trying to configure a splashscreen in capacitor.config.json and it works like a charm for iOS but on Android no touch is getting through to the app after startup and it is totally unresponsive. If I remove the SplashScreen part of the configuration file it works again. Any ideas?

  "plugins": {
    "SplashScreen": {
      "androidSplashResourceName": "splash",
      "androidScaleType": "CENTER_CROP",
      "androidSpinnerStyle": "large",
      "iosSpinnerStyle": "small",
      "spinnerColor": "#a50949",
      "showSpinner": true
    }
  }

Posts: 1

Participants: 1

Read full topic

Real device testing

$
0
0

@ahmadt wrote:

Hello Everyone,
Quick question from your experience.

I’m building an application (iOS, Android) it’s almost done, and I did my testing (in my personal android and ios device).

Now I wonder, do I need to test the app in multiple other devices (using AWS Device Farm)?

I don’t use too many 3rd party plugins (only capacitor-analytics and cordova-plugin-purchase)

What is your thought about doing more testing in real devices?

Posts: 1

Participants: 1

Read full topic

When deployed on Android device https calls don't work

$
0
0

@ioclaudio wrote:

Hi,
I have an existent and working Ionic4 app that uses web services for authentication and to get data from a remote server.

I was using HTTP, but now I’d like to use HTPPS.
I have changed the code by replacing Http with Https.

This is the code for the login phase, for example:

    const loginUrl = 'https://myserver.com:3843/auth/login';
    alert(loginUrl);
    return  this.httpClient.post(loginUrl, {
      email: username,
      password: password
    });

When I use the app locally from the browser it works (ionic serve -lcs).
If I use the app with the device in debug (ionic cordova run android), it works.

But if I produce the apk and I test the app on the mobile device, it doesn’t work.
On the server, the request doesn’t arrive.

What could be the problem?

Thank you very much.

cld

Posts: 1

Participants: 1

Read full topic

Adding uses-permission using Ionic native plugin Diagnostic

$
0
0

@AJ.M.A wrote:

Hi everyone,

I’m just wondering, does the diagnostic plugin automatically adds the permissions in the AndroidManifest.xml or do I need to do it manually?

I already put this on my config.xml:

<preference name="cordova.plugins.diagnostic.modules" value="LOCATION WIFI CAMERA NOTIFICATIONS EXTERNAL_STORAGE" />

but the only permission I saw in the AndroidManifest.xml is for the EXTERNAL_STORAGE.

Posts: 1

Participants: 1

Read full topic


Documentation missing

In ios device scroll table not working . in center of table touch for scroll not scroll in ios real device but in android proper workif anyone have scrollable table code for ios device please add code in comments. thanks in advance

Ionic-native/http/ngx v.s. @angular/common/http which should be used in an Ionic4 app?

$
0
0

@ioclaudio wrote:

Hi,
I can see that you can use two libraries to get/post data.

The first is @ionic-native/http/ngx:

import { HTTP } from '@ionic-native/http/ngx';
constructor(private http: HTTP) {}
return this.http
	.post(...)
	.then(..)
	
/* Returns a Promise */

the second is @angular/common/http:

import { HttpClient } from '@angular/common/http';
constructor(private httpClient: HttpClient)
return this.httpClient
	.post(...)
	.subscribe(..)
	
/* Returns an Observer */

I have to use a REST API with Https.
Which is the right solution, according to your experience?
Why?

Thank you very much

Posts: 1

Participants: 1

Read full topic

Movable Alert Box/modal likewise on windows

Streaming audio and video media plugin issues

$
0
0

@asifaathwal wrote:

I am developing a streaming audio and video media app. For this i am using streaming media plugin. the media plugin play audio and video successfully…But i want two things in it…that’s not working… 1: firstly i want to add background image in audio player because streaming start on the next page…and also i need back button because ios phones have no back button. 2: Secondly i want to show google adds…i am using google admob plugin for this…but i don’t know how can i show adds on streaming screen and after streaming bacause there is no back routes … Please help me how can i implement these two issue…

** video streaming**

DoStreaming() {
console.log("streaming",this.streamingUrl);
let options: StreamingVideoOptions = {
 successCallback: () => { console.log('Video played') },
 errorCallback: (e) => { console.log("error streaming", e) },
orientation: 'landscape',
 controls: true,
 shouldAutoClose: false
 };
  this.streamingMedia.playVideo(this.streamingUrl, options);
  }

** audio streaming**

DoStreamingRadio() {
let options: StreamingAudioOptions = {
  successCallback: () => { console.log('Audio played') },
  errorCallback: (e) => { console.log("error streaming", e) },
    keepAwake: false,
    bgImage: "assets/tv.png",
    bgImageScale: "stretch"
     //bgColor:'#8FBC8F'
    };
   this.streamingMedia.playAudio(this.streamingUrlRadio, options);
    }

** functions where i access both video and audio streaming**

radio(){
 this.redditService.DoStreamingRadio();

  }

 watchTV(){
   this.redditService.DoStreaming();

  }

** google addmob**

howBanner() {

    let bannerConfig: AdMobFreeBannerConfig = {
        isTesting: true, // Remove in production
        autoShow: true,
        id: "ca-app-pub-1474199829126409/2214530979"
    };

    this.admob.banner.config(bannerConfig);

    this.admob.banner.prepare().then(() => {
        // success
    });

    }
    launchInterstitial() {

    let interstitialConfig: AdMobFreeInterstitialConfig = {
        isTesting: true, // Remove in production
        autoShow: true,
        id: "ca-app-pub-1474199829126409/6644730574"
    }; 

    this.admob.interstitial.config(interstitialConfig);

    this.admob.interstitial.prepare().then(() => {
        // success
    });


   }

** home page**

<ion-col>
            <ion-img src="assets/tv.png" (click)="watchTV()"  ></ion-img>
          </ion-col>
          <ion-col>
            <ion-img src="assets/radio.png" (click)="radio()"  ></ion- 
           img>
          </ion-col>

i didn’t get any error but the background image is not shown…background color is shown perfectly…and i didn.t get adds

Posts: 1

Participants: 1

Read full topic

#1 i need to make title and logo in sameline . title stack in left

Command CodeSign failed with a nonzero exit code

$
0
0

@osrl wrote:

I’m running this command and it fails.

ionic cordova compile ios --no-interactive --release --device --prod – --packageType=app-store --developmentTeam=**** --provisioningProfile=***

There is a very long error message but here is how it ends. It’s not saying much but there is a problem about code signing.

CodeSign /var/root/Library/Developer/Xcode/DerivedData/MyApp-ccztmzoxngbmurbvfmxpessvdbbf/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app (in target: MyApp)
    cd /Users/xcloud/workspace/DCIOSApp_DummApp/platforms/ios
    export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate

Signing Identity:     "iPhone Distribution: ****"
Provisioning Profile: "match AppStore ***"
                      (****)

    /usr/bin/codesign --force --sign D4DC6C722544727A58C7449A285185812CAD815E --entitlements /var/root/Library/Developer/Xcode/DerivedData/MyApp-ccztmzoxngbmurbvfmxpessvdbbf/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/MyApp.build/Release-iphoneos/MyApp.build/MyApp.app.xcent /var/root/Library/Developer/Xcode/DerivedData/MyApp-ccztmzoxngbmurbvfmxpessvdbbf/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app
/var/root/Library/Developer/Xcode/DerivedData/MyApp-ccztmzoxngbmurbvfmxpessvdbbf/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app: errSecInternalComponent
Command CodeSign failed with a nonzero exit code

** ARCHIVE FAILED **


The following build commands failed:
        CodeSign /var/root/Library/Developer/Xcode/DerivedData/MyApp-ccztmzoxngbmurbvfmxpessvdbbf/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app
(1 failure)
xcodebuild: Command failed with exit code 65
[ERROR] An error occurred while running subprocess cordova.

        cordova compile ios --release --device --packageType=app-store --developmentTeam... exited with exit code 65.

I’m actally using fastlane to build and release the app. Fastlane ionic plugin is creating that command. If I can’t solve this error, I want to try to create the .xcarchive file so I can use fastlane to build the ipa after that.

Can you help me?

Posts: 1

Participants: 1

Read full topic


App is freezing when packet loss is high

$
0
0

@brianmackey wrote:

I’ve got an iPad deployment of Ionic 3. This particular app will freeze sometimes. This app has a particular workflow that takes about 5 minutes to complete. When it is freezing the app freezes about 75% of the time during this process. When it isn’t freezing it never freezes.

When the app starts freezing I run over to https://packetlosstest.com/ and I’ve seen packet loss from around 7% up to 18% at times where the app is freezing. The correlation between app freezes and packet loss in all cases I’ve run across is 100%.

We’ve tried multiple physical locations and multiple internet providers. And the correlation is the same. When I see this high packet loss (which seems to be common) then the app freezes.

Is there anything I can do to fix this problem? Has anyone else run across this?

Posts: 1

Participants: 1

Read full topic

Popover blurs the input on open

$
0
0

@habeeb1998 wrote:

I have a implemented a searchbar which inturn opens a popover onfocus, but after the popover opens, it blurs the searchbar input and if we try to focus the searchbar again the popover is blurred and disappears

Posts: 1

Participants: 1

Read full topic

Ionic home page component: No provider for Deploy

$
0
0

@derceto wrote:

Hi,

I’m evaluating the hot redeploy functionality. The doc refers to the Deploy dependency to inject in a module.

I created a blank project and adapted the home page:

import { Component } from '@angular/core';
import { Deploy } from 'cordova-plugin-ionic/dist/ngx';
import { environment } from 'src/environments/environment';

@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss']
})
export class HomePage {
  isProduction: boolean;
  versionsAvailable: number = 0;

  constructor(private _deploy: Deploy) {
    this.isProduction = environment.production;
  }

  async onCheckVersions() {
    const versions = await this._deploy.getAvailableVersions();
    this.versionsAvailable = versions.length;
  }
}

Running this in the browser fails, the same goes for a cordova run (platform: browser); The cordova run with Android as target platform (phsyical device) fails for the same reason, adding that some CORS issue happened accessing pro-manifest.json.

This makes me suppose it’s a basic Angular issue with importing the Deploy module.

ERROR Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[HomePage -> Deploy]: 
  StaticInjectorError(Platform: core)[HomePage -> Deploy]: 
    NullInjectorError: No provider for Deploy!
Error: StaticInjectorError(AppModule)[HomePage -> Deploy]: 
  StaticInjectorError(Platform: core)[HomePage -> Deploy]: 
    NullInjectorError: No provider for Deploy!

I don’t see a specifc cordova module to import and the doc doesn’t mention anything in that regard.

To validate that the config is done, I run the ionic deploy add <...> command and the system confirms:
Appflow Deploy plugin is already installed.

Thanks in advance for your attention and thoughts!

Posts: 1

Participants: 1

Read full topic

Ionic 4 how to call parent functions from popover menu

$
0
0

@obinnae wrote:

I have a popover menu, and I want each menu item to call a function from the main page. For instance, the main page is main-page.ts and the popover is popover.ts accessible from the top-right menu (it contains a number of items including ‘add new’). Now, main-page.ts contains an AddNew() function (as well as other functions listed in the popover menu), and when I open the popover menu and click ‘add new’, I want the AddNew() function to be called.

How do I implement that? I tried passing AddNew as a componentProps parameter in this.popoverController.create({…}), then in popover.ts used navparams to access it. But when the menu opens, it executes AddNew() immediately (and other functions passed in componentProps). Am I doing it correctly, or am I missing something?

Thanks.

Posts: 2

Participants: 1

Read full topic

Android build fails after adding Firebase for push messages

$
0
0

@elduderino15 wrote:

I am trying to compile my app for Android with a now enabled push notification functionality.
It seems a compatibility issue of mismatching firebase and other google services package versions.

However, I have no clue how to list the versions and which versions to bump up / down to fix this problem
Where shall I look to try to debug this?
Thanks!

Starting a Gradle Daemon (subsequent builds will be faster)
> Task :wrapper

BUILD SUCCESSFUL in 4s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_40t433hc0d8110x39iri9gi84.run(/Users/me/Documents/App/platforms/android/app/build.gradle:151)

FAILURE: Build failed with an exception.

* Where:
Script '/Users/me/Documents/App/platforms/android/cordova-support-google-services/App-build.gradle' line: 16

* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']
   > All firebase libraries must be either above or below 14.0.0

* 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 1s
/Users/me/Documents/App/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* Where:
Script '/Users/me/Documents/App/platforms/android/cordova-support-google-services/App-build.gradle' line: 16

* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']
   > All firebase libraries must be either above or below 14.0.0

Posts: 1

Participants: 1

Read full topic

Viewing all 70443 articles
Browse latest View live