Quantcast
Channel: Ionic Forum - Latest posts
Viewing all 230719 articles
Browse latest View live

Ionic(v4) React Menu controller

$
0
0

Exactly what I was looking for. Thanks!!


Blink Id Recognizer

$
0
0

Did anyone manage to initialized Blink Id recognizer using the latest @ionic-native/blinkid ?

My code is not hitting the server url

$
0
0

My code is working perfectly when i am serving the app. It works perfectly also in my mobile browser but when i build an apk it is showing no compile time errors but the server url is not hitting. I have declared my url in environment.ts file. Also if there any additional changes do let me know!!

I am new to ionic so plz help me.

How to Save file image from URL?

$
0
0

I want to save file image from url.

url = ‘shorturl.at/lrPSZ’

How can I access to the _angularFireAuth.auth.currentUser.email inside a person.service.ts?

$
0
0

I’m writing an ionic angular application with login/password security using Firebase.
I’ve no issue to get the value back of _angularFireAuth.auth.currentUser.email inside any pages except from a person.service.ts that is defined as a service.
Could you please help me to solve that.

Here is my person.service.ts:

import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import InvoicesList from './subtypes';
import { AngularFireAuth } from '@angular/fire/auth';
import { auth } from 'firebase';

@Injectable({
  providedIn: 'root'
})
export class PersonService {

  constructor(private _httpClient: HttpClient,
    private _angularFireAuth2: AngularFireAuth ) { }

  getAllNonSignedInvoicesForOne(personemail: string): Observable<InvoicesList[]>{
    console.log(this._angularFireAuth2.auth.currentUser.email);
    return this._httpClient.get<InvoicesList[]>(APIAllNonSignedInvForOne+"&email=" + personemail);
  }
}

const APIAllNonSignedInvForOne = "http://www.XXXX.be/v/ebills/call.php?query=allinvoices&signed=N";

The console is complaining with:

AppComponent_Host.ngfactory.js? [sm]:1 ERROR TypeError: Cannot read property 'email' of null
    at PersonService.getAllNonSignedInvoicesForOne (person.service.ts:43)
    at new AppComponent (app.component.ts:121)
    at createClass (core.js:31998)
    at createDirectiveInstance (core.js:31807)
    at createViewNodes (core.js:44210)
    at createRootView (core.js:44082)
    at callWithDebugContext (core.js:45632)
    at Object.debugCreateRootView [as createRootView] (core.js:44848)
    at ComponentFactory_.create (core.js:30788)
    at ComponentFactoryBoundToModule.create (core.js:25731)

But if I write at the same place console.log(this._angularFireAuth2.auth);
I see all this log where I can find my mail… Very strange… Can you please help me?

Lm {l: false, settings: Bl, app: FirebaseAppImpl, b: oi, O: Array(4), …}
B: null
I: []
INTERNAL: {delete: ƒ, logFramework: ƒ}
J: [ƒ]
Ja: ƒ ()
O: Array(0)
length: 0
__proto__: Array(0)
P: null
Sb: Lm {l: false, settings: Bl, app: FirebaseAppImpl, b: oi, O: Array(0), …}
Tb: B {a: 2, i: dl, c: null, b: null, f: null, …}
Ub: ƒ ()
Vb: ƒ ()
W: "Ot93XXXXXXXXXXmyqo1"
Xa: null
Y: B {a: 2, i: undefined, c: null, b: null, f: null, …}
Z: null
a: dl {i: {…}, v: 0, B: "eXXXfirebaseapp.com", u: "XXXXXXXXXXXXX", m: "[DEFAULT]", …}
app: FirebaseAppImpl {firebase_: {…}, isDeleted_: false, name_: "[DEFAULT]", automaticDataCollectionEnabled_: false, options_: {…}, …}
b: oi {c: "AIXXXXXXXXXXw", l: "https://securetoken.googleapis.com/v1/token", u: Qe, g: {…}, h: "https://www.googleapis.com/identitytoolkit/v3/relyingparty/", …}
currentUser: Q
I: []
J: true
O: [ƒ]
P: []
Sb: Q {I: Array(0), l: "XXXXXXXXXXXXXXXw", m: "[DEFAULT]", o: "eXXXXXXXXfirebaseapp.com", a: oi, …}
W: ƒ ()
Xa: null
Y: Lm {l: false, settings: Bl, app: FirebaseAppImpl, b: oi, O: Array(0), …}
Z: Lm {l: false, settings: Bl, app: FirebaseAppImpl, b: oi, O: Array(0), …}
a: oi {c: "XXXXXw", l: "https://securetoken.googleapis.com/v1/token", u: Qe, g: {…}, h: "https://www.googleapis.com/identitytoolkit/v3/relyingparty/", …}
b: Il {f: oi, a: "AXX", b: "eXXXXrQ", c: XXX
da: zm {a: "AXXX:[DEFAULT]", b: qk}
displayName: null
email: "XXXXXXXXXvincent@gmail.com"
emailVerified: false
ga: null
h: null
i: dl {i: {…}, v: 0, B: "XXXX.com", u: "XXXXXX", m: "[DEFAULT]", …}
isAnonymous: false
l: "XXXXXX"
la: undefined
m: "[DEFAULT]"
ma: "Lm {l: false, settings: Bl, app: FirebaseAppImpl, b: oi, O: Array(4), …}
B: null
I: []
INTERNAL: {delete: ƒ, logFramework: ƒ}
J: [ƒ]
Ja: ƒ ()
O: Array(0)
length: 0
__proto__: Array(0)
P: null
Sb: Lm {l: false, settings: Bl, app: FirebaseAppImpl, b: oi, O: Array(0), …}
Tb: B {a: 2, i: dl, c: null, b: null, f: null, …}
Ub: ƒ ()
Vb: ƒ ()
W: "xxxxxxxxxx"
Xa: null
Y: B {a: 2, i: undefined, c: null, b: null, f: null, …}
Z: null
a: dl {i: {…}, v: 0, B: "xxxxxxeapp.com", u: "xxxxx", m: "[DEFAULT]", …}
app: FirebaseAppImpl {firebase_: {…}, isDeleted_: false, name_: "[DEFAULT]", automaticDataCollectionEnabled_: false, options_: {…}, …}
b: oi {c: "xxxxx", l: "https://securetoken.googleapis.com/v1/token", u: Qe, g: {…}, h: "https://www.googleapis.com/identitytoolkit/v3/relyingparty/", …}
currentUser: Q
I: []
J: true
O: [ƒ]
P: []
Sb: Q {I: Array(0), l: "AIxxxxxxxxw", m: "[DEFAULT]", o: "xxxxxxxx.firebaseapp.com", a: oi, …}
W: ƒ ()
Xa: null
Y: Lm {l: false, settings: Bl, app: FirebaseAppImpl, b: oi, O: Array(0), …}
Z: Lm {l: false, settings: Bl, app: FirebaseAppImpl, b: oi, O: Array(0), …}
a: oi {c: "xxxxxxxxx", l: "https://securetoken.googleapis.com/v1/token", u: Qe, g: {…}, h: "https://www.googleapis.com/identitytoolkit/v3/relyingparty/", …}
b: Il {f: oi, a: "AxxxxA", b: "exxxxxxx", c: xxxxxx
da: zm {a: "xxxxxx:[DEFAULT]", b: qk}
displayName: null
email: "XXXXXXXXXXvincent@gmail.com"
emailVerified: false
ga: null
h: null
i: dl {i: {…}, v: 0, B: "exxxxxxx.firebaseapp.com", u: "Axxxxx", m: "[DEFAULT]", …}
isAnonymous: false
l: xx9w"
la: undefined
m: "[DEFAULT]"
ma: "xxxxxxx
metadata: Nl {a: xxx b: xx lastSignInTime: "Tue, 08 Sep 2020 13:19:19 GMT", creationTime: "Wed, 19 Feb 2020 13:36:56 GMT"}
o: "ebill-fa229.firebaseapp.com"
phoneNumber: null
photoURL: null
providerData: [{…}]
refreshToken: "Axxxxxxxx
tenantId: null
u: Rc {src: Q, a: {…}, b: 3}
uid: xxxxxxxxx
va: false
w: Fl {c: 30000, f: 960000, h: ƒ, i: ƒ, g: ƒ, …}
wa: ƒ (e)
xa: ƒ (e)
_lat: "xxxxxxx
__proto__: G
ga: true
h: Bm {a: "xxxxxxxxxx:[DEFAULT]", b: qk, c: {…}, f: B}
i: B {a: 2, i: undefined, c: null, b: null, f: null, …}
l: false
la: undefined
languageCode: (...)
m: [ƒ]
ma: ƒ ()
o: 0
settings: Bl {vb: false}
tenantId: (...)
u: Rc {src: Lm, a: {…}, b: 2}
ub: ƒ ()
va: false
w: zm {a: "Axxxxxxxxxw:[DEFAULT]", b: qk}
wa: ƒ ()
xa: ƒ ()
lc: (...)
ti: (...)
get lc: ƒ ()
set lc: ƒ (b)
get ti: ƒ ()
set ti: ƒ (b)
__proto__: xxxxxxxxxxx
metadata: Nl {a: xxxxx  b: xxxxxxx  lastSignInTime: "Tue, 08 Sep 2020 13:19:19 GMT", creationTime: "Wed, 19 Feb 2020 13:36:56 GMT"}
o: "exxx.firebaseapp.com"
phoneNumber: null
photoURL: null
providerData: [{…}]
refreshToken: "Axxxxxxx
tenantId: null
u: Rc {src: Q, a: {…}, b: 3}
uid: "xxxxxx1"
va: false
w: Fl {c: 30000, f: 960000, h: ƒ, i: ƒ, g: ƒ, …}
wa: ƒ (e)
xa: ƒ (e)
_lat: "xxxxxxx
__proto__: G
ga: true
h: Bm {a: "xxxxxxxxxxx:[DEFAULT]", b: qk, c: {…}, f: B}
i: B {a: 2, i: undefined, c: null, b: null, f: null, …}
l: false
la: undefined
languageCode: (...)
m: [ƒ]
ma: ƒ ()
o: 0
settings: Bl {vb: false}
tenantId: (...)
u: Rc {src: Lm, a: {…}, b: 2}
ub: ƒ ()
va: false
w: zm {a: "xxxxxxxx[DEFAULT]", b: qk}
wa: ƒ ()
xa: ƒ ()
lc: (...)
ti: (...)
get lc: ƒ ()
set lc: ƒ (b)
get ti: ƒ ()
set ti: ƒ (b)
__proto__: G

My code is not hitting the server url

$
0
0

change this in config.xml

  1. <widget id="com.illuminatus.qna" version="0.0.2" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    
  2. <preference name="android-minSdkVersion" value="19" />         <preference name="android-targetSdkVersion" value="28" /> 
    
  3.    <edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application">
         <application android:usesCleartextTraffic="true" />
         <application android:allowBackup="false" />
         <application android:fullBackupOnly="false" />
     </edit-config>  
    

then remove platform and re add platform
i) ionic cordova platform remove android
ii) ionic cordova platform add android

test it this should work

Ionic 5 cordova app suddenly can no longer build

$
0
0

I have an Ionic 5 (cordova not capacitor) project that I have been working on for a while. I have built it many times over the past couple months. I last built successfully a couple weeks ago. It has always built. I hadn’t touched it in a couple weeks and came back to work on sorting out some GeoLocation issues which required adding a few new plugins. I got the new geo approach working in Chrome and then went to try to build. I found out the app would no longer build. I removed plugins, reverted back to an old version from git and no luck.

The errors were not consistent but this was one of them:

> Task :app:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     E:\www\sz.app\platforms\android\app\src\main\res\xml\authenticator.xml:2: AAPT: error: resource mipmap/icon (aka nl.stolpersteinezutphen.www:mipmap/icon) not found.

I must have found some posts talking about versions of Java so I spent hours uninstalling and re-installing various versions of JDK and JRE. I was about to call it a night when i tried to build one more time. Much to my surprise; the app built. I loaded it on a device and it worked fine.

Excited by this unexpected fix i wanted to re-add some of the new geo plugins to see if that new solution would work on a device. When i tried to do standard plugin install:

ionic cordova plugin add @mauron85/cordova-plugin-background-geolocation

it said i could not add a plugin that way to a capacitor project. When did my project become a capacitor project?

After some digging I found out I could remove it from being a capacitor project by doing this:

ionic integrations disable capacitor

but of course, after doing that my project would no longer build. I put it back as a capacitor project and it still would not build. I am now getting the error posted above, again, after hours wasted trying to sort out Java environment.

No idea why this all of sudden stopped being buildable. Tomorrow I will try a fresh ionic starter app and see if that builds; and then if it does, perhaps only solution here is to start with a fresh build and re-add all the plugins and code from scratch.

My code is not hitting the server url


Error on Ionic Serve

$
0
0
 ionic serve
> ionic-app-scripts.cmd serve --address localhost --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
[app-scripts] [05:20:28]  ionic-app-scripts 3.2.4
[app-scripts] [05:20:28]  watch started ...
[app-scripts] [05:20:28]  build dev started ...
[app-scripts] [05:20:28]  typescript error
[app-scripts]             Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom',
[app-scripts]             'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator',
[app-scripts]             'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol',
[app-scripts]             'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string',
[app-scripts]             'es2017.intl', 'esnext.asynciterable'.
[app-scripts] [05:20:28]  ionic-app-script task: "serve"
[app-scripts] [05:20:28]  TypeError: Cannot read property 'replace' of null
[app-scripts] TypeError: Cannot read property 'replace' of null
[app-scripts]     at Object.escapeHtml

ionic info
[ERROR] Error loading ionic-angular package.json: Error: Cannot find module ‘ionic-angular/package’

    Require stack:
    - c:\xampp\htdocs\app-reciklado-ionic\node_modules\ionic\lib\project\index.js
    - c:\xampp\htdocs\app-reciklado-ionic\node_modules\ionic\lib\index.js
    - c:\xampp\htdocs\app-reciklado-ionic\node_modules\ionic\index.js
    - C:\Users\Fred\AppData\Roaming\npm\node_modules\@ionic\cli\bin\ionic

Ionic:

Ionic CLI : 5.4.16
Ionic Framework : not installed
@ionic/app-scripts : 3.2.4

Capacitor:

Capacitor CLI : 2.4.0
@capacitor/core : 2.2.0

Utility:

cordova-res : 0.15.1
native-run : 1.0.0

System:

NodeJS : v12.18.3 (C:\Program Files\nodejs\node.exe)
npm : 6.14.8
OS : Windows 10

in migrate from 3 to 5

Ionic 4 Service variables do not change their values

Ionic 4 Service variables do not change their values

$
0
0

Then what do you suggest to keep the email _angularFireAuth.auth.currentUser.email) available in any pages ( component, service,…) of the app if you suggest to not use Storage?

2 builds on the same code give two different outcomes

$
0
0

(topic withdrawn by author, will be automatically deleted in 24 hours unless flagged)

Ionic 4 livereload crash browser

$
0
0

any luck on solving this issue !?

postData turns Uncaught TypeError: Cannot read property 'postPvdr' of null error

$
0
0

Hi everyone i need your help about my issue. I will be happy if i can get any help of you.

I make login and in success function i need to send onesignal playerid to php again. Because i want to send notification only logged users. For this i will send playerid when user logged in and with onesignal api i will set datatag to a user. So i am using these codes to this. But when login success function i get this error when posting playerid to php.

Uncaught TypeError: Cannot read property ‘postPvdr’ of null

ps: first postData is working well and success function is working well too. But when i try to post another data in success function i get this error.

Thanks for your help.

let body = {
        login_username: this.login_username,
        login_password: this.login_password,
        login_device: this.userdevicename,
        login_device_model: this.userdevicemodel,
        login_device_marka: this.userdevicemanufacturer,
        logdatas: 'do_login'
      };

      this.postPvdr.postData(body, 'http://www.website.com/login.php').subscribe((data) =>{
        var alertbox = data.msg;
        if (data.success) {

        var notificationOpenedCallback = function(jsonData) {
          console.log('notificationOpenedCallback:' + JSON.stringify(jsonData));
        };
        window["plugins"].OneSignal
          .startInit("xxx", "xxx")
          .handleNotificationOpened(notificationOpenedCallback)
          .endInit();

        window["plugins"].OneSignal.getIds(function(ids) {
            console.log(ids.userId);
            let body = {
              loggedplayerid : ids.userId
            };
            this.postPvdr.postData(body, 'http://www.website.com/edit_device.php').subscribe(data => {
              for(let loggedplayer of data.result){
                this.loggedplayers.push(loggedplayer);
              }
            });
        });

My code is not hitting the server url

$
0
0

I had faced same issue my app was working on browser but not on android so i searched for it and found this solution and i tried it its working for me please try once


Vanilla JS - wait for component to load

$
0
0

I’m using a standard tag to load ionic. I have an and I want to get hold of the input element using getInputElement().

It seems Ionic loads the components scripts async so even after the DOM has loaded I still need to wait for ionic to load before I can get the input element. The global Ionic object is not even initially available after DOM loaded.

So, does Ionic have an event/means of notifying when components have loaded or do I need to create a check that will just loop until Ionic is available?

What is the best mobile app development company in Doha?

$
0
0

Are you looking for a top mobile app development company that develops web, mobile and android app in Doha, Qatar? here your search is ended. India App Developer is top App Development Company in Doha.

We develop web & mobile applications with various platforms like iOS, iPad, and Android. we have developed more than 400+ mobile applications on various platforms. India App Developer is well-accustomed with Apple and Google tools desired to develop a mobile app to nurture your business worldwide. It has a positive track record of satisfying more than 100+ clients and having served 15+ countries.

Their Dedicated Team has developed more than 400+ mobile apps in varied categories like - Health, Fitness, Music, Entertainment, restaurant, real estate, travel, and many more.

They also provide app development services like IOS app development, android app development, iPad app development, IoT app development, Swift app development, React Native app development, Ibeacon app development, and more. Do visit the website for more details.

My code is not hitting the server url

$
0
0

I Tried it… It is not working…

Vue Tab Content not displayed when conditional display logic used on tab buttons

$
0
0

Having strange issue with my tabs in a Vue app.
I have three tabs.

When Im logged I want to see all 3 tabs.

If Im logged out I only want to see 1 tab.

So I put some logic inside 2 of the tab buttons like this:

<ion-tab-button v-if="auth" tab="profile">
              <ion-label>Profile</ion-label>
</ion-tab-button>

I get the auth value from a vuex store getter.

If auth is true then it shows tab. This works fine in that when I’m logged out it hides the tabs and when I’m logged in it shows them. The problem is when I click on these tabs (the ones with the v-if logic) when logged in. When I click on them the page appears completely blank - everything goes - tabs and content - nothing is showing.

The funny thing is the elements are actually still there on the page behind this white wall! - I can hover over the area where I know the buttons etc should be and I can click on them - its just that nothing is on the screen. If I reload the browser even once then all the tabs work fine.

Im wondering if there is something else I can do to fix this issue!!?

A better way to conditionally hide tabs if logged in/not logged in etc?

One thing I tried that worked was I switched from hash to history mode in the router. Everything works fine then! However I dont want to do this as the app is deployed to github pages and to get github pages to work with history mode is a pain.

V5 native plugins with Ionic 3?

$
0
0

We’re still on Ionic 3 - we were planning on upgrading in a few months, in our next release. We’re using the Google Maps plugin, and for that to work on Android, we need to upgrade @ionic-native/google-maps to version 5.x. I tried making this upgrade, but I ended up in versioning hell, so I have some questions I was hoping someone would know the answers to:

  1. Do all @ionic-native plugins need to be on the same version?
  2. Will @ionic-native v5 plugins work with Ionic 3?
  3. Is there some easy way to figure out which versions of the various components I need?
Viewing all 230719 articles
Browse latest View live


Latest Images

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