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

Hardware back button Issue in ionic 4.10.3

$
0
0

@Ronbd53 wrote:

I am using Latest android studio, with every thing up to date . i just created a application with ionic current version . but problem is . when i debag it in my android device . i can’t close the application using back button . i am just confused . whats wrong with my application , i tryed all off step like ```
this.platform.exitApp();

this.platform.exitApp();

or
navigator.app.exitApp()

or
navigator[‘app’].exitApp()

but nothing is worked , just confused . why ionic doing ths with us every time . its really a good idea to update. but with proper gideline .

Posts: 1

Participants: 1

Read full topic


Build apk with phonegap done white screen long time

$
0
0

@fahd123 wrote:

I using IONIC 4 , when i build apk in phonegap and testing in my phone , just display white screen long time
please help me to resolve my problem

Posts: 1

Participants: 1

Read full topic

Local storage not save value of a checked radio

$
0
0

@aligassan wrote:

I’d like to store my checked radio button in local storage from returning data from Ionic 4 Modal . when l click on any radio button to change value and reload page l got same value not saving in local storage

export class Tab1Page {
  weather:any;
  cities = 'Muscat'

    constructor(private https: HttpClient,public popoverController: PopoverController
      ,public nav : NavController,public modalController: ModalController,
      private storage: Storage ) {

        this.test()

    }

    async test (){

      this.https.get('weather/'+this.cities+'.json')
      .subscribe(data => {

        this.weather = data

      })

  this.storage.set('cities',this.cities)

  this.storage.get('cities',this.cities).then((val) => {
    console.log('Your city is', val);
  });   

 }


    async openUserModal() {

      const modal = await this.modalController.create({
        component: PopoverstationsPage,
      });

      await modal.present();
      modal.onDidDismiss().then((r) => {

        console.log("the result:", r , 'test'+ this.cities);
        this.cities = r.data.result

        this.test()
      this.storage.set('cities',this.cities)

  this.storage.get('cities',this.cities).then((val) => {
    console.log('Your city is', val);
  });     

      });

    } 

l puted storage in two function to check if he is saving or not but he doesn’t save . how can l save and keep it value when l change it from radio button even if reload page ?

Posts: 1

Participants: 1

Read full topic

Using database with Ionic mobile app

$
0
0

@Baskyabro wrote:

Hello everyone, just looking for advice on a mobile app. I am creating a pokemon app(dumbed down version of bulbapedia/smogon) using Ionic. I was just looking for advice on what kind of database I should use to store the data, such as pokemon names, moves, types. I see people suggesting sqlite, firebase, etc… but didn’t know which would be best for calling this data efficiently. I tried just calling the PokeAPI for the data but it is way too slow. Any help would be appreciated!

Posts: 1

Participants: 1

Read full topic

Ionic 3 webview problem that I want to ask for

$
0
0

@pdj wrote:

Hello :slight_smile:
I have a simple app that when user launch app, it automatically redirect to some web page(I’m using inappbrowser);
but the problem is that after splah loading image, there is a blank page before launch webview. it’s becuase home.html is white blank page.

is there any trick that it looks appear webview right after splash image?

I tried to load image file just like splash image
but it also have white page shown first and then show png image

home.html
```
your image

Posts: 1

Participants: 1

Read full topic

Not receving data from HTTP post request

$
0
0

@Farkasama wrote:

Hello,

I am having a problem using the cordova plugin advanced HTTP.

So I’m trying to log to my local API with this code

const tab = {
    'pseudo' : this.pseudo,
    'mdp' : this.mdp
};

this.http.setDataSerializer('json');
this.http.setHeader('localhost:8080', 'Content-Type', 'application/json');

this.http.post('http://localhost:8080/api/utilisateur/login/', tab, {}).
   then(reponse => {
        console.log(reponse);
   })
   .catch(error => {
        console.log(error);
   });

and the console is displaying me a anwser with status 200 but with data empty but i’m supposed to receive the token.

Hope you guys can help me !
Thanks !

Posts: 1

Participants: 1

Read full topic

Meteor android build error and not run in android device

$
0
0

@Priyanka4010 wrote:

i am running meteor project, i using the command fro run in the device directly by this:
meteor run android-device --allow-superuser

and making android build or .apk with this command:
meteor build ~/Desktop --server="http://localhost:3000"

but i have error on running both commands:

Errors executing Cordova commands:         
                                              
   While running Cordova app for platform Android with options --device:
   Error: Command failed: /home/indi/Desktop/Untitled Folder/tapshopapp/.meteor/local/cordova-build/platforms/android/cordova/run --device
   FAILURE: Build failed with an exception.
   
   * What went wrong:
   Execution failed for task ':mergeDebugResources'.
   > /root/.gradle/caches/transforms-1/files-1.1/play-services-ads-lite-16.0.0.aar/86e9769b97191e3c68089a85fe8b03f6/res/values/values.xml:1:1:
   Error: Premature end of file.
   
   * 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 26s
   { Error: /home/indi/Desktop/Untitled Folder/tapshopapp/.meteor/local/cordova-build/platforms/android/gradlew: Command failed with exit code
   1 Error output:
   FAILURE: Build failed with an exception.
   
   * What went wrong:
   Execution failed for task ':mergeDebugResources'.
   > /root/.gradle/caches/transforms-1/files-1.1/play-services-ads-lite-16.0.0.aar/86e9769b97191e3c68089a85fe8b03f6/res/values/values.xml:1:1:
   Error: Premature end of file.
   
   * 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 26s
   at ChildProcess.whenDone (/home/indi/Desktop/Untitled
   Folder/tapshopapp/.meteor/local/cordova-build/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
   at emitTwo (events.js:126:13)
   at ChildProcess.emit (events.js:214:7)
   at maybeClose (internal/child_process.js:925:16)
   at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
   stderr: '\nFAILURE: Build failed with an exception.\n\n* What went wrong:\nExecution failed for task \':mergeDebugResources\'.\n>
   /root/.gradle/caches/transforms-1/files-1.1/play-services-ads-lite-16.0.0.aar/86e9769b97191e3c68089a85fe8b03f6/res/values/values.xml:1:1:
   Error: Premature end of file.\n\n* Try:\nRun with --stacktrace option to get the stack trace. Run with --info or --debug option to get more
   log output.\n\n* Get more help at https://help.gradle.org\n\nBUILD FAILED in 26s\n',
   stdout: 'Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details\nConfiguration \'compile\' in project \':\'
   is deprecated. Use \'implementation\' instead.\nThe Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in
   Gradle 5.0. Please use Task.doLast(Action) instead.\n\tat build_4j1leaq492888k5bhcg7w7hj9.run(/home/indi/Desktop/Untitled
   Folder/tapshopapp/.meteor/local/cordova-build/platforms/android/build.gradle:146)\npublishNonDefault is deprecated and has no effect
   anymore. All variants are now published.\n:cdvCreateAssetManifest\n:preBuild\n:CordovaLib:preBuild UP-TO-DATE\n:CordovaLib:preDebugBuild
   UP-TO-DATE\n:CordovaLib:checkDebugManifest\n:CordovaLib:processDebugManifest\n:preDebugBuild\n:CordovaLib:compileDebugAidl\n:compileDebugAidl\n:CordovaLib:packageDebugRenderscript
   NO-SOURCE\n:compileDebugRenderscript\n:checkDebugManifest\n:generateDebugBuildConfig\n:prepareLintJar\n:generateDebugResValues\n:generateDebugResources\n:CordovaLib:compileDebugRenderscript\n:CordovaLib:generateDebugResValues\n:CordovaLib:generateDebugResources\n:CordovaLib:packageDebugResources\n:mergeDebugResources\n/root/.gradle/caches/transforms-1/files-1.1/play-services-ads-lite-16.0.0.aar/86e9769b97191e3c68089a85fe8b03f6/res/values/values.xml:1:1:
   Error: Premature end of file.\n:mergeDebugResources FAILED\n15 actionable tasks: 15 executed\n',
   code: 1 } 'Error: /home/indi/Desktop/Untitled Folder/tapshopapp/.meteor/local/cordova-build/platforms/android/gradlew: Command failed with
   exit code 1 Error output:\nFAILURE: Build failed with an exception.\n\n* What went wrong:\nExecution failed for task
   \':mergeDebugResources\'.\n>
   /root/.gradle/caches/transforms-1/files-1.1/play-services-ads-lite-16.0.0.aar/86e9769b97191e3c68089a85fe8b03f6/res/values/values.xml:1:1:
   Error: Premature end of file.\n\n* Try:\nRun with --stacktrace option to get the stack trace. Run with --info or --debug option to get more
   log output.\n\n* Get more help at https://help.gradle.org\n\nBUILD FAILED in 26s\n    at ChildProcess.whenDone (/home/indi/Desktop/Untitled
   Folder/tapshopapp/.meteor/local/cordova-build/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)\n    at
   emitTwo (events.js:126:13)\n    at ChildProcess.emit (events.js:214:7)\n    at maybeClose (internal/child_process.js:925:16)\n    at
   Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)'
   at ChildProcess.exitCallback (/tools/utils/processes.js:151:23)
   at emitTwo (events.js:126:13)
   at ChildProcess.emit (events.js:214:7)
   at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)

Please help , i already stuck in this issue that android apk is not generated from 3 days. Thanks in advance.

Posts: 1

Participants: 1

Read full topic

Getting error in firebase-analytics plugin using ionic 3

$
0
0

@saberprashant wrote:

Hi everyone,

I am using firebase-analytics plugin in my ionic 3 app, which I installed following this link:


Now, when I try to fire a custom event using this:

this.firebaseAnalytics.logEvent('page_view', {page: "dashboard"})
  .then((res: any) => console.log(res))
  .catch((error: any) => console.error(error));

I am getting an error as:

ERROR Error: Uncaught (in promise): TypeError: Object(...) is not a function
TypeError: Object(...) is not a function
    at FirebaseAnalytics.logEvent (vendor.js:102827)
    at MyApp.webpackJsonp.853.MyApp.registerFA (main.js:8375)
    at main.js:8239
    at t.invoke (polyfills.js:3)
    at Object.onInvoke (vendor.js:4509)
    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 (vendor.js:4500)
    at FirebaseAnalytics.logEvent (vendor.js:102827)
    at MyApp.webpackJsonp.853.MyApp.registerFA (main.js:8375)
    at main.js:8239
    at t.invoke (polyfills.js:3)
    at Object.onInvoke (vendor.js:4509)
    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 (vendor.js:4500)
    at c (polyfills.js:3)
    at polyfills.js:3
    at t.invokeTask (polyfills.js:3)
    at Object.onInvokeTask (vendor.js:4500)
    at t.invokeTask (polyfills.js:3)
    at r.runTask (polyfills.js:3)
    at o (polyfills.js:3)

I don’t know what is the problem as no custom methods like setCurrentScreen() , setUserId()etc aren’t working.
But all the automatic tracking events like “user_engagement”, “screen_view”, etc which are fired by firebase analytics by default are working properly (I even saw them in my firebase console).

Please help :slight_smile:

Posts: 1

Participants: 1

Read full topic


Ionic Accessing Json Object

$
0
0

@skyscraperaki001 wrote:

Hello Everyone I am new to ionic and I desperately need your help. I have a web service which returns this kin of json data
return response()->json([
‘questions’=>$questions,
'exam_ID=>$exam_ID,
‘modulechoices’=>$modulechoices,
‘learningpath_ID’=>$learningpath->learningpath_ID
]]);
I just want to know how to access them in ionic view

Posts: 1

Participants: 1

Read full topic

Load data from Json file

Sim Info question

Want to hire app developer consultant

$
0
0

@nsammons wrote:

I am looking to hire someone to help me get my app from Ionic Creator to the apple and android app stores. My app is nothing but text and images, very simple. I hope i’m not violating terms of forum use by asking.

Posts: 1

Participants: 1

Read full topic

Virtual scroll - scroll to item

$
0
0

@salehasadi wrote:

hi, how should scroll programmatically to specific item, when height of the items of virtual scroll is not equal!?

Posts: 1

Participants: 1

Read full topic

Ion-ionic not showing in my phone ionic4

NullInjectorError: No provider for NavParams!

$
0
0

@NorthFred wrote:

I’m creating an app with tabs in ionic3:

Ionic:

   ionic (Ionic CLI)  : 4.9.0 (C:\Users\_____\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.3

I have this code in my tabs.ts, which uses “NavParams” to keep track of the tab indices when navigating to a different page:

import { Component } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { IonicPage, NavParams } from 'ionic-angular';

import { Tab1Root, ......Tab5Root } from '../';

@IonicPage()
@Component({
  selector: 'page-tabs',
  templateUrl: 'tabs.html'
})
export class TabsPage {
  tab1Root: any = Tab1Root;
  ...
  tab5Root: any = Tab5Root;

  tab1Title = " ";
   ...
  tab5Title = " ";

  tabIndex: number;

  constructor(
    navParams: NavParams,
    public translateService: TranslateService
  ) {
    translateService.get(['TAB1_TITLE', ......., 'TAB5_TITLE']).subscribe(values => {
      this.tab1Title = values['TAB1_TITLE'];
      ....
      this.tab5Title = values['TAB5_TITLE'];
    });

    this.tabIndex = 0;

    if (navParams.data.index) {
      this.tabIndex = navParams.data.index;
    }
  }
}

In ‘app.comonent.ts’, I open the tabs with this function:

  openPage(page) {
    this.menu.close();
    this.nav.setRoot(page.component, {index: page.index});
  }

I have used the same code in an OLDER ionic project, where everything was working fine. For this newer project, I am getting following NullInjector Error:

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

As far as I remember, NavParams does not need importing/provision in ‘app.module.ts’. So where is this coming from?

Does anyone have any clue what I might be doing wrong?

Posts: 1

Participants: 1

Read full topic


How to pass folder URL in model using ionic 4?

$
0
0

@gokujy wrote:

here my code:

Posts: 1

Participants: 1

Read full topic

Ionic vs Angular

$
0
0

@ioclaudio wrote:

Hi,
according to you, what are the advantages of creating a hybrid app with Ionic 4 rather than with pure Angular?

Claudio

Posts: 1

Participants: 1

Read full topic

Ionic 4 ng model doesn't working

$
0
0

@raz-ride4you wrote:

Ionic 4 with AngularJS:

<ion-input ng-model="formData.example"></ion-input>
{{formData.example}}

The data is not getting binded.

The project is setted up with vanilla JS, is there any implementation that can make this to be working with AngularJS?

Posts: 1

Participants: 1

Read full topic

Getting Started with Ionic and React in Small Chunks: Tabs

$
0
0

@aaronksaunders wrote:

I was playing around with Ionic React Beta by looking through the conference app sample and there is alot of good stuff in there. I find it easier to consume in small chunks so I created a sample app here showing how to use IonTabs with some routing.

This is an updated version of a previous Ionic/Mobx Cart app

Please feel free to post comments/issues in the repo

Posts: 1

Participants: 1

Read full topic

Ionic DevApp CORS Issue

$
0
0

@elaias wrote:

Hi everyone!

I’m having a CORS related issue.
Ionic 3, Angular 5, Java, Spring
The requests from browser are sent fine BUT I can’t send them from iOS Ionic Dev App, it doesn’t reach the server.

How do I solve this issue?
Thanks in advance!

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>