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

Ionic 3 Android facebook login

$
0
0

UPDATE: When uploaded to Google store the FB login worked fine. I guess just have faith


The sandbox is not sync with the podfile.lock

I'm trying to read as dataurl contact picture

$
0
0

I’m using ionic-native contacts picture plugin and cordova, everything its okay but i need to read photos of contacts as dataurl in order of upload them but i can’t find the way of doing that. Can anyone help me

Ion-alert / ion-toast erroring only on prod build

$
0
0

I’m building a site with stencil and all is going well, except I’ve noticed that ion-alert and ion-toast are erroring but only in the prod build.

That is to say, when I’m developing using npm start all works fine, my alert looks like this:

ion-alert1

And there are no errors.

However once I build the app to deploy with npm run prod which calls stencil build --prerender then the alert doesn’t have a message, and throws a js error.

ion-alert2
ion-alert-error

ion-toast has the same behavior, working in dev, throwing the same error and not showing the message after build. I tried building without prerender, and the same behavior persists.

I have no idea how to debug this since it works during development, and the error is thrown in compiled/minified code.

The way I’m using the alert is pretty straight forward:

  alert(message: string, header?: string, subheader?: string) {
    return new Promise(resolve => {
      const alert = document.createElement('ion-alert');

      if (header) {
        alert.header = header;
      }

      if (subheader) {
        alert.subHeader = subheader;
      }

      alert.message = message;

      alert.buttons = [
        {
          text: 'Okay',
          handler: () => {
            resolve(true);
          }
        }
      ];

      document.body.appendChild(alert);
      return alert.present();
    });
  }

Any ideas?

Binding

$
0
0

Finally after a long time searching i found a solution on this post:

The selectedText Attribute in combination with a compareWith Function did solve the problem.

Ionic 4, selfie video native plugin

$
0
0

Hey there, I have spent some time looking for a plugin that enables the ionic application to capture videos with the front camera (“selfie”) for both iOS and Android.

I have struggled with most of the cordova plugins as they either are not building for both iOS and Android or they do not enable to set the front camera as a parameter.

Does anyone have any feedback that may be useful, or could potentially point to the right direction?

Any help, would be greatly appreciated.

Best regards.

routerLink not updating url value when changed

$
0
0

I think I see what is happening. I added a break-point in the algorithm that determines if the routerLink should be active; and, it looks like the local urlTree isn’t actually updated at the point that the NavigationEnd event is evaluated. In the following screenshot, I’ve navigated to ..../1/screens/1/.... ; but, the routerLink urlTree is still checking against the previous url, ..../1/screens/2/.... :

2017-11-18_06-16-07

Perhaps there is a race condition with the QueryList<RouterLink> in the RouterLinkActive directive - in which the DOM isn’t updated yet, at the time the NavigationEnd event has fired.

No error returned but no data returned on successful json post to api

$
0
0

If all else fails, you can contemplate remedying that by inserting a proxy that you do have access to into the equation.


I want to download a file from my rest and save it on download folder

$
0
0

Virtually every time somebody posts this here, it’s because they are using HTTP, not HTTPS endpoints. Is this true of you as well? If so, does your problem persist when using HTTPS?

Json Array when click every item shift to first of list(recently used in first)

$
0
0

I’m curious why the loop involving lots of pushing of undefined exists.

How to read [object object] using *ngFor in angular2

$
0
0

To me, “iterate” means “go through a sequence of things”. Can you explain how one would iterate when there is only one thing?

I'm trying to read as dataurl contact picture

$
0
0

This isn’t true, FWIW. You can read the photo (or anything else) as an ArrayBuffer and upload that.

I'm trying to read as dataurl contact picture

$
0
0

but i couldn’t do it, the url in the contact object come as ‘content://com.android.contacts/…’. With webview.convertFileSrc i can show the image but i haven’t found the way of read it as dataurl or ArrayBuffer, can you help me with an example, thank you in advance

React - Handle Hardware Back Button

$
0
0

Is it possible to handle the hardware back button in a react app?

I have seen some examples for angular apps but none for react.

How to use one native function on multiple pages

$
0
0

First, the rest of this post is meant in no way to throw shade on anything said in @EinfachHans’s post. It’s great, and even on the topic I’m going to disagree a bit with is a perfectly reasonable way of going about things.

That being said, I prefer to organize projects by what code does, not how it does it. So if I have a FooListComponent, a FooDetailComponent and a FooService that feeds the first two hot steaming bowls of Foo, I would put them all in the same directory, as opposed to shunting FooService off to live with the likes of BarService and BazService.

The most important takeaway from all this is that Angular is very forgiving about project structure. Put stuff where you expect to find it. If I find myself hunting for a class in the same wrong place more than twice, I move it there so there won’t be a third time.


I'm trying to read as dataurl contact picture

$
0
0

Anything you can assign as the src parameter of an img tag should be fetchable with HttpClient. HttpClient can retrieve things as Blobs.

I'm trying to read as dataurl contact picture

$
0
0

thanks, i will try and let you know

How to show Multiple Portfolios in one Account

$
0
0

Sounds pretty similar to the Tour of Heroes - I would expect you would get lots of mileage out of going through it.

I'm trying to read as dataurl contact picture

$
0
0

I did it and this was the error:

  1. HttpErrorResponse {headers: HttpHeaders, status: 404, statusText: “OK”, url: “http://localhost/app_content/com.android.contacts/contacts/136/photo”, ok: false, …}

  2. headers: HttpHeaders {normalizedNames: Map(0), lazyUpdate: null, lazyInit: ƒ}

  3. status: 404

  4. statusText: “OK”

  5. url: “http://localhost/app_content/com.android.contacts/contacts/136/photo”

  6. ok: false

  7. name: “HttpErrorResponse”

  8. message: “Http failure response for http://localhost/app_content/com.android.contacts/contacts/136/photo: 404 OK”

  9. error: Blob {size: 3692, type: “text/xml”}

  10. proto: HttpResponseBase

How to use one native function on multiple pages

$
0
0

I absolute agree with @rapropos - the most important thing is that it fits for you and you have a overview about your code

Viewing all 228653 articles
Browse latest View live


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