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

Ionic 4 Could not determine the dependencies of task'com.google.playservices'

$
0
0

@ctfrancia wrote:

I am trying to run my application natively after installing the GooglePlus in the application, however, this is turning into an Inception of errors and frustration. I have been following the rabbit of whole, and after downgrading Cordova to 6.4.0 because it doesn’t support 7.0.0, because of an SDK not specified error I am now getting the error:

* What went wrong:
Could not determine the dependencies of task ':com.google.playservices:google-play-services_lib:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':com.google.playservices:google-play-services_lib:debugCompileClasspath'.
   > Could not resolve project :CordovaLib.
     Required by:
         project :com.google.playservices:google-play-services_lib
      > Project :com.google.playservices:google-play-services_lib declares a dependency from configuration 'debugCompile' to configuration 'debug' which is not declared in the descriptor for project :CordovaLib.

I have no idea where this CordovaLib is so I am assuming it is the package itself?

Posts: 1

Participants: 1

Read full topic


Copy on clipboard on web app

$
0
0

@RaulGM wrote:

Hi,

I developed an app with Ionic 4 and I’m trying to copy some text on a mobile’s clipboard. I’ve tried with the javascript function addEventListener. It works as expected on a desktop, but when I try to use it on a mobile, nothing gets copied. This is the code I used, just in case:

document.addEventListener('copy', (e: ClipboardEvent) => {
  e.clipboardData.setData('text/plain', textToCopy);
  e.preventDefault();
  document.removeEventListener('copy', null);
});
document.execCommand('copy');

I tried to do it with the clipboard plugin as well but, since it’s a web app, it doesn’t work.

Any awesome ideas?

Posts: 1

Participants: 1

Read full topic

Ionic 4 Filter Unique Data With Pipe

$
0
0

@dzakyr wrote:

So, I want to filter an api response, unique data only based on project id, but the project id is deep down inside the array.

I’ve made a pipe but its not filtering unique data.instead it filter based on the inputted parameter.

  filterProject(myProject: any) {
return myProject.project.target / myProject.project.total == 1; }

now I want to create a pipe to filter the unique data based on project id. here’s the data structure:

Thanks in Advance!

Posts: 1

Participants: 1

Read full topic

*ngIf does not recognize changes in Ionic 4.8.1

$
0
0

@stigwa wrote:

Hi

I have migrated from @ionic/angular 4.4.0 to @ionic/angular 4.8.1
After the update my pages cant discover screen rotate with *ngIf

The above statements works fine with 4.4.0 and the screen rotate is discovered.
In the new version 4.8.1 this only works the first time the page loads, but never when the screen rotates.

Thanks in Advance!

Posts: 1

Participants: 1

Read full topic

Ionic 4 beginer

$
0
0

@Goshawk429 wrote:

I have created a new ionic 4 app by running this command…

“ionic start myapp tabs”

It works fine on browser and emulator…
But not working on real phone.

Just showing white screen after the splash screen.
Nothing happenend after that…

Thank you.

Posts: 1

Participants: 1

Read full topic

How to achieve tabs navigation manually

$
0
0

@ldoldan wrote:

Hello everyone!

I am new to Ionic and I read in the docs that a tab is basically a Navigation Controller. I was wondering how could I achieve then the effects of navigation and tab persistence using custom buttons and programming the logic of the tabs.

Any idea about how to start? The documentation does not explain how the Navigation Controller works with tabs.

Posts: 1

Participants: 1

Read full topic

Geolocation plugin fails on first call (Android)

$
0
0

@gnesher wrote:

When making the initial call for geolocation.getCurrentPosition / geolocation.watchPosition user get’s a pop up requesting permission.

However, by the time user approves the pop-up, geolocation.getCurrentPosition returns an error and geolocation.watchPosition simply never fires.

If the user leaves/rejoin the page position is initialized correctly.

However, I can’t see any way to wait for a user response before subscribing/getting the location

code looks like this (in a service):

  public startListening(): Observable<Geoposition> {
    this.geolocation.getCurrentPosition().then(
      (geoPosition: Geoposition) => {
        console.log('initial', geoPosition);
        this._currentLocation.next(geoPosition);
      },
      error => {
        console.log(error);
        this._currentLocation.next(null);
      }
    );

    this.locationSubscription.unsubscribe();
    this.locationSubscription = this.geolocation.watchPosition().subscribe(
      geoPosition => {
        console.log('subscription', geoPosition);
        this._currentLocation.next(geoPosition);
      },
      error => {
        console.log(error);
        this._currentLocation.next(null);
      }
    );

    return this._currentLocation.asObservable();
  }

Posts: 1

Participants: 1

Read full topic

On page reload ionic 4 app doesn't allow to key in any input

$
0
0

@pragz wrote:

Hi,

We have ionic 4 web app, this application is deployed to AWS i.e. www folder. When I open the application it opens and I can perform required operations, but when I reload the application I can not key in any input and navigate from segments the app is totally blocked, not sure why is this happening only in my system. Is it an issue of lazy loading of components or issue with the browsers I am using?

When I right click and do inspect on chrome browser the block is released and I am able to key in input and navigate through out the app.

Please help me fix this issue. I have attached the screenshot of my system config where I was testing this app. So far I have tried in chrome having 76.0 version and edge having version 44.18362 browsers and my system config is OS: Windows 10, 64bit OS, Processor: i7, RAM: 8GB

Ionic info is:

ionicinfo

Posts: 1

Participants: 1

Read full topic


InAppBeowser is not opening external URL in iOS but it works fine in Android - Ionic V3

$
0
0

@praneshrangan wrote:

I am using Ionic V3 and trying to open up external URL using InAppBrowser. It works fine in Android but it does not work in iOS.

Below is the code,

this.iab.create(url,’_blank’,‘usewkwebvie=yes’);

Please help me in resolving this !

Posts: 1

Participants: 1

Read full topic

Split-pane not displaying menu on mobile

$
0
0

@alanschaeffer wrote:

Desktop view:
image

Mobile View (Menu is missing):
image

<ion-app>
  <ion-split-pane>

    <ion-menu type="overlay">
      <ion-header>
        <ion-toolbar>
          <ion-title>Menu</ion-title>
        </ion-toolbar>
      </ion-header>
      <ion-content>
        <ion-list>
          <ion-menu-toggle auto-hide="false" *ngFor="let p of appPages">
            <ion-item [routerDirection]="'root'" [routerLink]="[p.url]">
              <ion-icon slot="start" [name]="p.icon"></ion-icon>
              <ion-label>
                {{p.title}}
              </ion-label>
            </ion-item>
          </ion-menu-toggle>
        </ion-list>
      </ion-content>
    </ion-menu>

    <ion-router-outlet main></ion-router-outlet>

  </ion-split-pane>
</ion-app>
  "dependencies": {
    "@angular/common": "^7.2.2",
    "@angular/core": "^7.2.2",
    "@angular/forms": "^7.2.2",
    "@angular/http": "^7.2.2",
    "@angular/platform-browser": "^7.2.2",
    "@angular/platform-browser-dynamic": "^7.2.2",
    "@angular/router": "^7.2.2",
    "@ionic-native/core": "^5.0.0",
    "@ionic-native/splash-screen": "^5.0.0",
    "@ionic-native/status-bar": "^5.0.0",
    "@ionic/angular": "^4.1.0",
    "@ionic/storage": "^2.2.0",
    "core-js": "^2.5.4",
    "lodash": "^4.17.15",
    "moment": "^2.24.0",
    "rxjs": "~6.5.1",
    "tslib": "^1.9.0",
    "zone.js": "~0.8.29"
  }

Posts: 1

Participants: 1

Read full topic

Git project to buind both Android and iOS

$
0
0

@bluborgo wrote:

Hello,

Currently I have an Ionic1 project under GIT control via bitbucket.
I generally develop with my Windows 7 PC from where I build the Android release.

Then I checkout the project into my macbook from where i build the iOS version.
Every time I push some news to the repo and the I go to the MAC to pull that changes, I struggle because some files are changed in the MAC, like config.xml or package.json since some plugins are not exacly the same version.
And I waste a lot of time…

Maybe I added some file to the git repo thta I should leave separated in the windows/android and MAC version?

Is there a best practice to manage this?

Thank you,
Michele

Posts: 1

Participants: 1

Read full topic

Easiest way to share a piece of data between all of my apps users?

$
0
0

@leaves wrote:

Hello, I am new to ionic and looking for the most simple way to share a set of variables between all the users of my application. I have a “prize pool” that should be shared between every user, and updated when one of these users adds to the pool. Additionally I need to hold users login info somewhere, but I believe there are multiple easy ways to do this like with Ionic Storage.

I have heard firebase might be able to do what I am looking for, but I am hesitant to go ahead with this option. It may be too bloated for my simple scenario?
I have heard something about using PUSH cordova to send information between my apps. And I have seen someone mention webIntent that may be able to do what I am looking for.
The obvious solution is a server with a database, but that may be hard to implement and cost me a good deal of cash in the long run.

Posts: 1

Participants: 1

Read full topic

[Ionic 4] Problem reading a image from path

$
0
0

@leonardofmed wrote:

Context

I have a function that grab some files, add them to a zip file and save in device’s storage. The function uses JSZip, and was working great until I tried to add images to the zip file. JSZip has an option to receive the image file as base64, so I tried with it. To get the images as base64 from the device storage I’m using the function readAsDataURL from the Ionic File plugin.


My converter function

async uriToBase64(uri) {
	console.log('File received to be converted: ', uri);
	let nameFile = uri.replace(this.file.dataDirectory, '');
	console.log("File name to be converted: ", nameFile);

	await this.file.readAsDataURL(this.file.dataDirectory, nameFile).then((file64) => {
		let fileWithoutExtension = ('' + file64 + '').replace(/^data:image\/(png|jpg|jpeg);base64,/, '');
		console.log("File without extension: ", fileWithoutExtension);
		return fileWithoutExtension;
	})
	.catch(err => {
		console.log("Error while transforming image to base64: ", err);
	});		
}

The problem
I’m receiving the “File without extension” log, but I’m also receiving an error that blocks the save of my zip file. The error is the following:

Error: Can’t read the data of ‘1566993701809.jpg’. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?

I believe this is a problem with the JSZip plugin, but it should read the images as base64. I tried without the async function also, but the image files inside the zip got size equal 0, so I thought it might be because the function had not read the image yet. Then I got this error.


How my base64 look like
Don’t know if will be useful, but this is part of what returns from my convert function:
/9j/4QEmRXhpZgAASUkqAAgAAAAPAJqCCgABAAAAwgAAABABAgAKAAAAygAAAAABAwABAAAACAQAAJ2CCgABAAAA1AAAAAOkAwABAAAAAAAAAAmSAwABAAAAAAAAAA8BAgAIAAAA3AAAACeICAABAAAA4gQAAAqSBQABAAAA5AAAAAiSAwABAAAAAAAAABIBAwABAAAAAQAAAAeSAwABAAAA/////wEBAwABAAAALAcAADIBAgAUAAAA7AAAAGmHBAABAAAAAAEAAAAAAABDAAAA6AMAAFNNLUU1MDBNAAAWAAAACgAAAFNBTVNVTkcASgEAAGQAAAAyMDE5OjA4OjI4IDA5OjAyOjE5AAIAAQIEAAEAAAAeAQAAAgIEAAEAAAAAAAAAAAAAAP/bAEMAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/bAEMBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIBywECAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeo...
And it have 1 576 076 characters.

Posts: 1

Participants: 1

Read full topic

Get git credit for your contributions!

$
0
0

@perry wrote:

Crowdin doesn’t use an individual’s GitHub login when making commits and submitting a PR to ionic-docs. Still, I’d like for you to be able to get credit for your work. If you can put your git info on your crowding profile, I will add you to the merge commits as a co-author. This is the format

githubusername <name@example.com>

Posts: 1

Participants: 1

Read full topic

PWA scrolling issue on iOS - Ionic 4

$
0
0

@Nsimoncini wrote:

Hi, I’m still facing the scroll issue on iOS which cause interface to freeze for few seconds and make user experience quite bad.

If I got it right it should be a scroll + focus issue. Does anyone have a workaround? It has not been solved for a couple of years now and I really need to release my PWA for both iOS and Android (which is working perfectly).

(To reproduce the issue you just need to build a PWA and deploy it. The issue is amplified when you use “Add to the homescreen” in Safari).

Cheers,
Niccolò

Posts: 1

Participants: 1

Read full topic


How can i try my app on AVD manager

How to take text of a page

$
0
0

@CoalaDrogado wrote:

I have to make a Android application for my business but i have a question how can i take a text of one site in the web ? Can use ionic to browse in console of this page and take the text or have one API to do this ?

Sorry for my bad English.

Posts: 1

Participants: 1

Read full topic

Service provider return undefined http request

$
0
0

@Saban wrote:

Hello,
I have this issue with http request to my server and I got returning as undefined in my app.component.ts file.

My provider function looks like this:

async getPostBySlug(slug){
  let postBySlug=await this.get("posts?slug="+slug)
  await postBySlug.subscribe((post:any)=>{
    this.onePostBySlug=post
  });
}

and then my app.component.ts function is starting on initializeApp() and looks like this:

private async onPushOpened(data) {
    console.log(data)
    let url = data.notification.payload.launchURL
    console.log(url)
    let slug = url.split('/')[4]
    console.log(slug);
    this.api.getPostBySlug(slug)
    console.log(this.api.onePostBySlug)
    //this.nav.push(DetailPage, {post: this.api.postBySlug})
  }

Where I’m mistaken all of this?
Why I can’t get response value on my app.component?
Thanks

Posts: 2

Participants: 2

Read full topic

toString() function does not exist?

Http Post request to Woocommerce API creates empty order (no data)

$
0
0

@geo3433 wrote:

I post this data to Woocommerce API for creating a new order:

 orderData = {
       "payment_method": "bacs",
   "payment_method_title": "Direct Bank Transfer",
  "set_paid": true,
  "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "john.doe@example.com",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Doe",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  },
  "line_items": [
    {
      "product_id": 7,
      "quantity": 1
    }
  ],
  "shipping_lines": [
    {
      "method_id": "flat_rate",
      "method_title": "Flat Rate",
      "total": 7
    }
  ]
}

My http post request is like that:

his.http.post('API_URL?consumer_key=ck_&consumer_secret=cs_',
    JSON.stringify(orderData), {
      headers: { 'Content-Type': 'application/json'
    }
    }).subscribe(response => { newOrderData=response; console.log(newOrderData);});

A new order is created but the data of the body is not posted. I read about this issue on Stackoverflow and they claimed that it happens due to the lack of the header, which I include in my request.

Posts: 1

Participants: 1

Read full topic

Viewing all 70908 articles
Browse latest View live


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