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

Im getting error FileError code: 5, message: ENCODING_ERR when file.writeFile

$
0
0

@Faraon wrote:

Hi, im using ionic-native/file with cordova-plugin-file in order of write a new csv file. I have the csv data but when i try to do this.file.writeFile(path, filename) it returns:
ERROR Error: Uncaught (in promise): FileError: {“code”:5,“message”:“ENCODING_ERR”}
at resolvePromise (polyfills-es2015.js:4147)
at resolvePromise (polyfills-es2015.js:4104)
at polyfills-es2015.js:4208
at ZoneDelegate.invokeTask (polyfills-es2015.js:3741)
at Object.onInvokeTask (vendor-es2015.js:97815)
at ZoneDelegate.invokeTask (polyfills-es2015.js:3740)
at Zone.runTask (polyfills-es2015.js:3518)
at drainMicroTaskQueue (polyfills-es2015.js:3909)

I have try some options that are in other post but nothing solve me the problem

Posts: 1

Participants: 1

Read full topic


Scroll ion-content after append data

android.app.RemoteServiceException: Bad notification for startForeground?

$
0
0

@RomnEmpire wrote:

Hi Team,
I have generated the android build from Android studio and its installed properly but its not working some version 9 devices. check below device list:

Checked Mobile devices:
Samsung ,MI,Nokia : App crashed after login
Oppo F11 Pro: App not crashed properly working.

i got below error in the console.

android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: Notification(channel=null pri=-2 contentView=null vibrate=null sound=null defaults=0x0 flags=0x42 color=0x00000000 vis=PRIVATE)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2105)
at android.os.Handler.dispatchMessage(Handler.java:109)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7377)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)

Can anybody help me regarding above issue i spent above issue last 3 days?

Posts: 1

Participants: 1

Read full topic

Fix my lunching the app

Ionic 4, Tabs center button

$
0
0

@TaimoorMughal wrote:

I have been trying to create tab menu like:


Have tried to create this so far:

image

Can anyone help me o create a curve here. Have also tried with ion-fab.

Here is the code;

tabs.page.scss

.tabHeader{
    padding-right: 5px;
    padding-left: 5px;
}
.tab1 {
  background-color: black;
  border-top-left-radius: 25px;
  border-bottom-left-radius: 25px;
}
.tab2 {
  border-top-right-radius: 40px;
  background-color: black;
}
.tab3 {
  width: 25px;
  border-radius: 52%;
  background-color: black;
}
.tab4 {
  border-top-left-radius: 40px;
  background-color: black;
}
.tab5 {
  background-color: black;
  border-top-right-radius: 25px;
  border-bottom-right-radius: 25px;
}
tabs.page.html
<ion-tabs>

    <ion-tab-bar slot="bottom" class="tabHeader">
        <ion-tab-button tab="tab1" class="tab1">
            <ion-icon name="md-home"></ion-icon>
            <ion-label>Home</ion-label>
        </ion-tab-button>

        <ion-tab-button tab="tab2" class="tab2">
            <ion-icon name="clock"></ion-icon>
            <ion-label>History</ion-label>
        </ion-tab-button>

        <ion-tab-button tab="tab1" class="tab3">
                <ion-icon name="ios-qr-scanner"></ion-icon>
                Start
        </ion-tab-button>

        <ion-tab-button tab="tab3" class="tab4">
            <ion-icon name="md-person"></ion-icon>
            <ion-label>Profile</ion-label>
        </ion-tab-button>

        <ion-tab-button tab="tab3" class="tab5">
            <ion-icon name="md-person"></ion-icon>
            <ion-label>Profile</ion-label>
        </ion-tab-button>
    </ion-tab-bar>

</ion-tabs>```

Posts: 1

Participants: 1

Read full topic

Ionic 5 geolocation and geocoder plugins stopped working

$
0
0

@Pratikjaiswa15 wrote:

I am using ionic 5. Geolocation and geocoder plugins were working till yesterday but suddenly they have stopped working. I have tried clearing storage on mobile but the problem still persists.
I can’t get whats’s gone wrong. Thank you in advance

Here is the code

getGeolocation(){

     this.platform.ready().then(() =>{
      this.geolocation.getCurrentPosition().then((resp) => {
        this.geoLatitude = resp.coords.latitude;
        this.geoLongitude = resp.coords.longitude; 
        this.geoAccuracy = resp.coords.accuracy; 
        this.getGeoencoder(this.geoLatitude,this.geoLongitude);
       }).catch((error) => {
         alert('Error getting location'+ JSON.stringify(error));
       });
     }).catch((error) => { alert(error)})

    }

    //geocoder method to fetch address from coordinates passed as arguments
    getGeoencoder(latitude,longitude){
      this.nativeGeocoder.reverseGeocode(latitude, longitude, this.geoencoderOptions)
      .then((result: NativeGeocoderResult[]) => {
        this.geoAddress = this.generateAddress(result[0]);
      })
      .catch((error: any) => {
        alert('Error getting location'+ JSON.stringify(error));
      });
    }

    //Return Comma saperated address
    generateAddress(addressObj){
        let obj = [];
        let address = "";
        for (let key in addressObj) {
          obj.push(addressObj[key]);
        }
        obj.reverse();
        for (let val in obj) {
          if(obj[val].length)
          address += obj[val]+', ';
        }
      return address.slice(0, -2);
    }

package.json

"@ionic-native/geolocation": "^5.21.6",
"@ionic-native/native-geocoder": "^5.21.6",

Posts: 1

Participants: 1

Read full topic

AAPT error : Cant create a apk file

$
0
0

@YXUN wrote:

I am using ionic 4, capacitor and angular for my PWA. The thing is whenever I generate an APK folder, this error shows up and I have no clue how to solve it. Anyone can assist?

All my android studio, sdk, are all the latest versions.

This shows up “AAPT: C:\Windows\System32\demo1\android\app\build\intermediates\res\merged\release: error: directory does not exist.”

Appreciate any help.

Posts: 1

Participants: 1

Read full topic

Does contents of File dataDirectory get deleted when app is updated

$
0
0

@tombarnish wrote:

I’m using the native File plugin in an Ionic v4 app. Images are saved on the app in the File dataDirectory folder for both IOS and Android devices. Does this folder get deleted or cleared if I publish an app update?

Posts: 1

Participants: 1

Read full topic


White Screen when using Capacitor

$
0
0

@DonPabelito89 wrote:

Hello,

I had a stable ionic app and tried to use capacitor for additional features such as local notifications on device (offered ionic native plugins don’t work)
After I followed the tutorial what needs to be done to use an existing app with capacitor and I build the apk file, signed it, zipaligned it, installed it on my device, then start it: the splash screen shows correctly but then the screen gets white and is frozen.
Nothing happens after that.

What is the problem? Can anyone help me?

Posts: 2

Participants: 2

Read full topic

Android haskey is causing issues with Facebook and Google authentication in Ionic app

$
0
0

@DMoney wrote:

I’m not sure where my issues began but I think it was when I added additional emulators or SDKs in Android studio but at one point Google and Facebook authentication was working for both iOS and Android. Now it no longer works for Android. Facebook authentication gives me a “login error there is an error in logging you into this application”. Google gives me an “Error 10 Cannot read property ‘idToken’ of undefined”. I’ve tried removing both apps from Firebase and my app then re-adding to no avail.

Here’s how I’m generating my hashkey: keytool -exportcert -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore

If I navigate to that directory i can see debug.keystore.

Here’s the code but the code isn’t really the issue because this use to work.

    return this.facebook.login(['email'])
      .catch((error) => {
        console.log('facebook login', error);
      });```

      console.log('before gPlus');
      return this.googlePlus.login({
        webClientId : environment.googleWebClientId,
        offline : true,
      }).catch((error) => {
        console.log('error', error);
      });

I'm using the Web client (auto created by Google Service) as the clientId...so there has to be something going wrong with my haskey.

Any help would be greatly appreciated...I've been stuck on this for weeks now.

Posts: 1

Participants: 1

Read full topic

ng has unexpectedly closed

$
0
0

@Adarsh-Bellary wrote:

{

“name”: “tui-calendar”,

“author”: “NHN FE Development Lab dl_javascript@nhn.com”,

“version”: “1.12.11”,

“main”: “dist/tui-calendar.js”,

“types”: “index.d.ts”,

“license”: “MIT”,

“description”: “TOAST UI Calendar”,

“repository”: {

"type": "git",

"url": "https://github.com/nhn/tui.calendar.git"

},

“keywords”: [

"nhn",

"nhnent",

"toast",

"tui",

"component",

"calendar",

"fullcalendar",

"daily",

"weekly",

"monthly",

"business week",

"milestone",

"task",

"allday",

"jquery-plugin"

],

“files”: [

"src",

"dist",

"index.d.ts"

],

“devDependencies”: {

"@angular/cli": "9.0.3",

"@angular-devkit/build-angular":"^0.12.4",

"clean-webpack-plugin": "^0.1.19",

"css-loader": "^3.2.0",

"eslint": "^4.19.1",

"eslint-config-tui": "^1.0.3",

"eslint-loader": "^2.0.0",

"eslint-plugin-jasmine": "^2.10.1",

"extract-loader": "^2.0.1",

"handlebars": "^4.0.14",

"handlebars-template-loader": "^1.0.0",

"istanbul-instrumenter-loader": "^3.0.1",

"jasmine-core": "^2.99.1",

"jsdoc": "^3.5.5",

"karma": "^2.0.2",

"karma-chrome-launcher": "^2.2.0",

"karma-cli": "^1.0.1",

"karma-coverage": "^2.0.1",

"karma-fixture": "^0.2.6",

"karma-html2js-preprocessor": "^1.1.0",

"karma-jasmine": "^1.1.2",

"karma-jasmine-ajax": "^0.1.13",

"karma-jasmine-jquery-2": "^0.1.1",

"karma-json-fixtures-preprocessor": "0.0.6",

"karma-junit-reporter": "^1.2.0",

"karma-preprocess-preprocessor": "^0.2.0",

"karma-sauce-launcher": "^1.2.0",

"karma-source-map-support": "^1.3.0",

"karma-sourcemap-loader": "^0.3.7",

"karma-spec-reporter": "0.0.32",

"karma-webdriver-launcher": "git+https://github.com/nhn/karma-webdriver-launcher.git#v1.2.0",

"karma-webpack": "^3.0.0",

"mini-css-extract-plugin": "^0.4.0",

"optimize-css-assets-webpack-plugin": "^5.0.3",

"preprocess-loader": "^0.3.0",

"safe-umd-webpack-plugin": "^4.0.0",

"style-loader": "^0.21.0",

"stylus": "^0.54.5",

"stylus-loader": "^3.0.2",

"tslint": "^5.12.0",

"tui-jsdoc-template": "^1.2.2",

"tui-release-notes": "git+https://github.com/nhn/toast-ui.release-notes.git#v1.0.1",

"typescript": "^3.2.1",

"uglifyjs-webpack-plugin": "^1.2.5",

"url-loader": "^1.0.1",

"webpack": "^4.13.0",

"webpack-cli": "^3.0.8",

"webpack-dev-server": "^3.1.4"

},

“scripts”: {

"test": "karma start --no-single-run",

"test:ne": "KARMA_SERVER=ne karma start",

"test:types": "tsc --project test/types",

"bundle": "webpack --mode development && NODE_ENV=production webpack --mode production && node tsBannerGenerator.js",

"serve": "webpack-dev-server --mode development --progress --inline --hot",

"cpy-dist2doc": "mkdir -p doc/dist && cp -f -r dist doc",

"release-note": "tuie",

"eslint": "eslint ./src",

"tslint": "tslint index.d.ts",

"doc:serve": "tuidoc --serv",

"doc": "tuidoc"

},

“dependencies”: {

"tui-code-snippet": "^1.5.0",

"tui-date-picker": "^4.0.2",

"tui-time-picker": "^2.0.1"

}

}

Posts: 1

Participants: 1

Read full topic

FCMPlugin.js: is created FCMPlugin.js:76 FCMPlugin Ready ERROR

$
0
0

@gleycerparra wrote:

I’m having problems with the FCM Plugins, I got this error when call my initializeApp with this code

  private initializeApp(): void {
    if (this.platform.is('android') || this.platform.is('ios')) {
      this.statusBar.styleDefault();
      this.splashScreen.hide();
      this.fcm.getToken().then(token => {
        console.log("TCL: AppComponent -> token", token)
      });
    }
  }

In console I’m having this error

And this is my app.module

import { firebaseConfig } from './../environments/environment';
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 { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { AngularFireModule } from '@angular/fire';
import { AngularFirestoreModule } from '@angular/fire/firestore';
import { AngularFireAuth } from '@angular/fire/auth';
import * as firebase from 'firebase';
import { Camera } from '@ionic-native/camera/ngx';
import { AngularFireStorageModule } from '@angular/fire/storage';
import { IonicStorageModule } from '@ionic/storage';
import { ChatDetailsPageModule } from './chat-details/chat-details.module';
import { FCM } from '@ionic-native/fcm/ngx';

firebase.initializeApp(firebaseConfig);

@NgModule({
  declarations: [AppComponent],
  entryComponents: [],
  imports: [
    BrowserModule,
    IonicModule.forRoot(),
    AppRoutingModule,
    AngularFireModule.initializeApp(firebaseConfig),
    AngularFirestoreModule,
    AngularFireStorageModule,
    IonicStorageModule.forRoot(),
    ChatDetailsPageModule,
  ],
  providers: [
    FCM,
    StatusBar,
    SplashScreen,
    { provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
    AngularFireAuth,
    Camera,
  ],
  bootstrap: [AppComponent]
})
export class AppModule {}

Posts: 1

Participants: 1

Read full topic

Deeplinks and Index App Content

$
0
0

@media4learning wrote:

Hi all, I have an Ionic 3 app that uses both Deeplinks and Index App Content Cordova and Ionic Native plugins.

Individually these plugins work fine. When installed together - the Deeplinks plugin stops the Index App Content plugin from working. My problem is, I need both of these plugins to work.

The specific problem is, when a spotlight search item is pressed, the app opens, however I get
“Another implementation (e.g. plugin) already handled that userActivity” logged from the Index App Content plugin.

Has anyone successfully implemented both of these plugins? Or does anyone have a suggestion to make these work together?

I am using Deeplinks 4.20.0 and Index App Content 4.18.0

Thanks! Chris

Posts: 1

Participants: 1

Read full topic

Ionic 4 role based authentication fiebase

$
0
0

@ayoimansor wrote:

Hi,

I am new with ionic, can you please help in providing ionic roles based authentication tutorial or link so i can learn.

Thank you

Posts: 2

Participants: 2

Read full topic

no matching service worker detected. You may need to reload the page

$
0
0

@akulabalaraju wrote:

We have added the PWA to our Ionic application. ngsw-config.json,and manifest.webmanifest fiels and assets folder are created and index.html file is included with manifest.webmanifest reference and service worker is included in app.module.ts file successfully. But when We run audit the the application we are getting no matching service worker detected. You may need to reload the page, or check that the service worker for the current page also controls the start URL from the manifest error.

Posts: 1

Participants: 1

Read full topic


The appearance of components differs according to the type of devices

$
0
0

@abdosaeed wrote:

is ionic components depend of device android version?, i think no, but a have designs work in some devices and not work in others, i with attach example of popup page contain checkbox appear

in device and not in other one, also ion-image component show image in devices and not in other

Posts: 1

Participants: 1

Read full topic

Onesignal plugin When app in focus issue

$
0
0

@fitmax wrote:

hey,
When app in focus I always get displayType=1 even if inFocusDisplaying=None
so in ios i get alert on screen and on android i keep get notification even the app is on focus…
i have try ver 2.7.0, 2.8.2, 2.8.3
problem is keep happening…

any ideas??

Posts: 1

Participants: 1

Read full topic

Ionic 4 toolbar transparent

$
0
0

@prabhashi1 wrote:

can Someone help me to transparent the ion-toolbar?

I have tried added fullscreen to ion content and add

ion-toolbar {
--background: transparent;
--ion-color-base: transparent !important;
}

to my css. its not changing

Posts: 1

Participants: 1

Read full topic

IONIC 4 - Side Menu do not show when it return to previous page

$
0
0

@fesica22 wrote:

Hi All, I have a question hope someone of you can help me

I created a side menu and it works on first deploy, how ever when i try to return from the original page. side menu do not show

thanks

Posts: 1

Participants: 1

Read full topic

Ionic start problem with grandle on android run - emulate (v5)

$
0
0

@ktsirakos wrote:

I have noticed that for a couple of projects now, when I use the command ionic start and I create a project, when I need to run it or emulate it on android the grandle gives me the following error
`* What went wrong:
A problem occurred configuring root project ‘android’.

Could not resolve all files for configuration ‘:classpath’.
Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.0.0).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/manifest-merger/26.0.0/manifest-merger-26.0.0.jar
Could not find ddmlib.jar (com.android.tools.ddms:ddmlib:26.0.0).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/26.0.0/ddmlib-26.0.0.jar
Could not find dvlib.jar (com.android.tools:dvlib:26.0.0).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/dvlib/26.0.0/dvlib-26.0.0.jar
Could not find common.jar (com.android.tools:common:26.0.0).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/common/26.0.0/common-26.0.0.jar
`

I used this solution
Here
and worked but I wonder,

why this is happening?
Why grandle is out of sync?
Is the following solution effects other people in my group who want to run the application?

ionic version: 5.4.14
grandle version
`

Gradle 4.8.1

Build time: 2018-06-21 07:53:06 UTC
Revision: 0abdea078047b12df42e7750ccba34d69b516a22

Groovy: 2.4.12
Ant: Apache Ant™ version 1.9.11 compiled on March 23 2018
JVM: 1.8.0_171 (Oracle Corporation 25.171-b11)
OS: Linux 5.3.0-40-generic amd64
`

(Because I am a noobie let me know what else you want me to provide)

Posts: 1

Participants: 1

Read full topic

Viewing all 71016 articles
Browse latest View live


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