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

Loading Cordova plugin to Tabs starter app

$
0
0

I have created an app using the Tabs starter project with Vue and Capacitor and followed the tutorial ‘Your first Ionic App’ to add a Photo Gallery on the 2nd Tab.
I’m now trying to add a Cordova plugin called ‘cordova-background-geolocation’ to the 3rd Tab but am having trouble understanding how to use it in Vue (I’m using a Vue 2 approach).

I cloned the sample repo https://github.com/transistorsoft/cordova-background-geolocation-SampleApp but this uses angular which I’m not familiar with enough to translate it over to Vue.

If I try and reference it in a method() function I get undefined but doing console.log("Mounted", Object.keys(BackgroundGeolocation)); in mounted() will dump out the keys so it is loading when using

import BackgroundGeolocation, {
		Location,
		MotionChangeEvent,
		MotionActivityEvent,
		GeofenceEvent,
		Geofence,
		HttpEvent,
		ConnectivityChangeEvent
	} from "cordova-background-geolocation-lt";

Should I be adding the BackgroundGeolocation to the Vue’s data object before using it?

1 post - 1 participant

Read full topic


Android apksigner fails on ionic5 built api

$
0
0

I’m not sure what Android studio is trying to tell me here. This process used to work with my old ionic3 project (now on ionic5).
Key is valid, used to work… Do I need another certificate? I don’t think so…

~/Android/Sdk/build-tools/30.0.2/apksigner sign --ks ./Setup/myStoreKey.jks  ./android/app/build/outputs/apk/debug/app-debug.apk


~/Android/Sdk/build-tools/30.0.2/zipalign -v 4 ./android/app/build/outputs/apk/debug/app-debug.apk ./myapp.apk

~/Android/Sdk/build-tools/30.0.2/apksigner verify ./myapp.apk

DOES NOT VERIFY
ERROR: JAR signer MYAPP.RSA: JAR signature META-INF/MYAPP.SF indicates the APK is signed using APK Signature Scheme v2 but no such signature was found. Signature stripped?
ERROR: JAR signer MYAPP.RSA: JAR signature META-INF/MYAPP.SF indicates the APK is signed using APK Signature Scheme v3 but no such signature was found. Signature stripped?

1 post - 1 participant

Read full topic

Display image from server

$
0
0

Hi, I am trying to display an image from my backend to my ionic 5 app.
The request works in postman, my server returns a readablestream (using mongodb) with image/jpeg as header. But for my ionic app I am able to display it in ionic serve but when I try on real device its not displayed (it display the default icon’ broken image’ + image name). Here is the code I use in my dashboard.ts

getUserAvatar(){
  this.userService.getUserAvatar().subscribe(
    (res: any) => {
      if (res.error ) {

      }
      else {
        console.log(res)
        this.createImageFromBlob(res);

      }
    })
}


createImageFromBlob(image: Blob) {
   let reader = new FileReader();
   reader.addEventListener("load", () => {
      this.userAvatar = reader.result;
      console.log(this.userAvatar)
   }, false);

   if (image) {
      reader.readAsDataURL(image);
   }
}

my html : <div (click)="chooseAvatar()" class="bmjContainer inlineBlock"><a><ion-img [src]="userAvatar" alt="bitmojiLink" class="bmjLogo"></ion-img></a></div>

and my userService.ts :

  getUserAvatar() : Observable<Blob>{
    return this.http.get(`${baseUrl}/chatApp/getUserAvatar`,{responseType: "blob"});
  }

any idea why its not correctly displayed only on real android device ? :confused:

5 posts - 3 participants

Read full topic

Web Push / Push Notification / IOS + Android on PWA

$
0
0

Hello Guys,

I am a bit confused…working on PWA application and so far I have a very good experience about Ionic.
Camera, Gelocation, etc. are working perfect on both OS with PWA.

Is the PWA / WebPush / Push Notification works also fine in IOS ?

Does anybody have an experience with that?

Thanks,Csaba

1 post - 1 participant

Read full topic

Ionic slides question

$
0
0

I have an Ionic slides with a text coming from an api and I want to split it in equal parts depending on the container (the slides) space on width and height, and the most important thing, I want to split the text (a looong string with words and sentences and Enters) in the way that the last sentence of the slide (a page) is not divided and it’s complete till the dot (.). I’m using Ionic 5 and Angular 11.

Example:

-Text: A text useful for everything. I know this is true.

INCORRECT WAY:
Slide 1:
A text use
ful for
everything.
Slide 2:
I know this is tru
e.

CORRECT WAY:
Slide 1:
A text useful
for everything.
Slide 2:
I know this is true.

1 post - 1 participant

Read full topic

How do I download Ionic Studio?

Best new anti-pollution face wash

$
0
0

Navah face wash is enriched with anti-inflammatory properties which are penetrates deep into your skin and remove clogged dirt and pollution. It has orange peel extract which work as natural cleanser which makes your skin soft and refreshes it. you can use it twice in a day to get glowing and pollution free skin.

1 post - 1 participant

Read full topic

E-cigarette Health Risks for Kids

$
0
0

Kids’ developing brains are more susceptible to addiction and e-cigarettes essentially provide a smoke-free way to inhale nicotine, which is more addictive than heroin, cocaine or alcohol. Some brands of e-cigarettes contain a dangerously high level of nicotine – more than twice what is found in traditional cigarettes and other e-cigarettes. Nicotine mixed with a developing brain can lead to addiction, reduced impulse control, and mood disorders. Nicotine also negatively impacts the prefrontal cortex, the area of the brain responsible for attention, decision.

feedback from: https://juicedoutvapes.co.uk/

1 post - 1 participant

Read full topic


Implement Google Ads

$
0
0

Hello,
i need to implement google ads on our app, in ionic native plugins i see only those for ad mob.

Is it feasible to add advertising from google ad manager, like a normal website?

Thanks in advance,

Andrea

1 post - 1 participant

Read full topic

Ionic deeplink : help for beginner

$
0
0

Hello,
i have an ionic 5 application (published on ios / android stores) with Angular/Capacitor, and i would like another app to be able to open my app on a smartphone.

So I have to add a deeplink on my application, correct?
I check this : https://github.com/ionic-team/ionic-plugin-deeplinks

But i don’t understand the configuration :

`URL_SCHEME` - the custom URL scheme you'd like to use for your app. This lets your app respond to links like `myapp://blah`

Can I choose anything? Or does it have to match my app / package name from my current config?

`DEEPLINK_SCHEME` - the scheme to use for universal/app links. Defaults to 'https' in 1.0.13. 99% of the time you'll use `https` here as iOS and Android require SSL for app links domains.
`DEEPLINK_HOST` - the host that will respond to deeplinks. For example, if we want `example.com/product/cool-beans` to open in our app, we'd use `example.com` here.

I don’t have a site or public url to provide here. It’s just a ‘local’ application. What should I put on?

Thank you for your help !

1 post - 1 participant

Read full topic

Ionic cordova local plugin error with new M1 macs

$
0
0

We have a some local plugins which were added using ionic cordova plugin add ./cordova-plugin-name

When building on intel macs they work fine, but in the new M1 mac with Big Sur I get the below error when building the project

Discovered saved plugin "cordova-plugin-ionic-keyboard". Adding it to the project
Installing "cordova-plugin-ionic-keyboard" for ios
Adding cordova-plugin-ionic-keyboard to package.json
Discovered saved plugin "cordova-plugin-iovation". Adding it to the project
Failed to restore plugin "cordova-plugin-iovation" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin file:scripts/plugin/cordova-plugin-iovation via registry. Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR!
Cannot read property 'match' of undefined
npm ERR!
npm ERR!
Discovered saved plugin "cordova-plugin-advanced-http". Adding it to the project
Failed to restore plugin "cordova-plugin-advanced-http" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin file:scripts/plugin/cordova-plugin-advanced-http via re gistry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR!
Cannot read property 'match' of undefined
A complete log of this run can be found in: /Users/xx/.npm/_logs/2021-01-21T12_29_50_477Z-debug.log
npm ERR!
npm ERR!
Discovered saved plugin "call-number". Adding it to the project
Installing "mx.ferreyra.callnumber" for ios
Adding mx.ferreyra.callnumber to package.json
Discovered saved plugin "cordova-plugin-app-version". Adding it
Installing "cordova-plugin-app-version" for ios

Is this a known issue and how can I fix it?

1 post - 1 participant

Read full topic

Trouble migrating Sencha2.4+Phonegap project

$
0
0

I followed the official migration guide to migrate our Phonegap (with Cordova) project. It uses an older version of Sencha (2.4). After following the guide I was able to build the native binaries for Android.

When I start the app, I am stuck within the loading screen. The log shows the following error message: “E/AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/www/.sencha/app/microloader/development.js”

I tried to get it done by creating a new Sencha project, integrating our source step by step. I thought that reorganizing the app to follow the migration guide (sources within www-folder) created these issues. But the same error occurs.

Maybe someone faced these issues aswell. Again, it is a fairly old project, written with old libraries. Here is my current project structure:

image

1 post - 1 participant

Read full topic

Looking for Data Management Services for Business

$
0
0

Hello Everyone,
PartnerBO is helping companies go beyond just data. Our B2B, Cloud, Big Data, Industrial, Enterprise Data Management and Governance consulting services will help you to map out your data future, manage and govern data holistically & add life into the data. Agile Enterprise Data Management using the best in class solutions for your enterprise.

Feel Free to Contact us for any query.

https://www.partnerbo.co/

1 post - 1 participant

Read full topic

I can't log into my ionic studio

$
0
0

Hello,

I downloaded ionic studio sometime back, I started a project last night, then this morning I am unable to log in?

It says I do not have an active subscription. Does this mean I have to use VS code ? Can I still make an app that will be interoperable with ios and android?

1 post - 1 participant

Read full topic

File transfer pdf upload return error 500

$
0
0

I’m having problems with the fileTransfer, when I send an image it accepts sending normally, when sending in pf format it reaches 99 percent of sending and returns error 500, a detail that “taught” the server to understand pdf files. The server expects four parameters: the file’s imputstream, code, description and user email. As I said when sending images works perfectly

What I tried:

I reviewed the server log and when it is an image it accepts the upload when it is pdf it says it did not receive the file (inputstream parameter)

On Server:

   public String salvar(@FormDataParam("file") InputStream inputStream, @FormDataParam("descricao") String descCliente,
   @FormDataParam("code") String cod, @FormDataParam("email") String loginUsuario) throws Exception {

My get file method:

 getFile(){
    this.fileChooser.open().then((fileURL) =>{
      this.filePath.resolveNativePath(fileURL).then((data) => {
        this.file= data
      })
    })
  }

My upload method:

upload(payload){
    console.log(payload)
    
    var filePath = payload.imageURI;
    var filename = filePath.split("/").pop();
    var extencao = filename.split(".").pop();
    let server
    var options : FileUploadOptions;

    
    server = url
    options = {
      fileKey: "file",
      fileName: filename,
      chunkedMode: false,

      headers: {
        Connecection: "close"
      },
      params: {
        code: this.clienteSelecionado.codigo,
        description: payload.descricao,
        email: this.dados.usuario
      }
    }


    return this.fileTransfer.upload(filePath, server, options).then((data) =>{
      let retorno = JSON.parse(data.response)
      console.log(retorno)
      if (retorno.sucesso) {
        this.toastSucesso(retorno.mensagem)
      } else {
        this.toastSucesso(retorno.mensagem)
      }
      console.log()
    }, (error) => {
      console.log(error)
    });
  }

1 post - 1 participant

Read full topic


Google Fit requestAuthorization() error

$
0
0

I’ve already registered Google OAuth 2.0 Client ID to enable the Fitness API and added cordova-plugin-health plugin following the Ionic Health document guideline too.

When I launch android app and access the [distance, nutrition … ] datatype, happened the following error. Do I need any additional process or code?

Thank you.


Error logs:

/health-health-module.js:150 platform ready!
/health-health-module.js:163 avaiable:true
/health-health-module.js:165 Already Authorised
/health-health-module.js:183 com.google.android.gms.common.api.ApiException: 4: The user must be signed in to make this API call.
/health-health-module.js:175 error User cancelled

==========================================

// my typescript code (Angular):

constructor(private health: Health, private platform: Platform) { }
ngOnInit() {
this.checkPlatformReady();
}

async checkPlatformReady() {
const ready = !!await this.platform.ready();
if (ready) {
console.log(‘platform ready!’)
}

this.health.isAvailable().then((available:boolean) => {
  console.log('avaiable:' + available);
  
  if (this.health.isAuthorized(["steps"])) {
    console.log("Already Authorised");
    this.health.requestAuthorization([  // **** Here is error happened... ***** // 
        "distance",
        "nutrition", 
        {
          read: ["steps", "height", "weight"],  
          write: ["height", "weight"], 
        },
      ])
      .then((res) => console.log("response " + res))
      .catch((e) => console.log("error " + e));

      this.health.queryAggregated({
        startDate: new Date(new Date().getTime() - 3 * 24 * 60 * 60 * 1000), 
        endDate: new Date(), // now
        dataType: 'steps',
        bucket: 'day'
      })
      .then(res => console.log(res))
      .catch(e => console.log(e));
  } else {
    this.health
      .requestAuthorization([
        "distance",
        "nutrition", 
        {
          read: ["steps"],  
          write: ["height", "weight"], 
        },
      ])
      .then((res) => console.log(res))
      .catch((e) => console.log(e));
  } 
})
.catch(e => console.log(e)); 
}

1 post - 1 participant

Read full topic

Appflow automation build error , ask upgrade to version 3

$
0
0

“Capacitor config command failed, ensure capacitor dependency has been updated to version 3 or more.”
I must upgrade capacitor to version 3 or there is another way to pass build process?

1 post - 1 participant

Read full topic

Ionic5 Apple Sign In

$
0
0

I am not able to deploy my App on AppStore due to the lack of AppleSignIn.

How are you dealing with it in Ionic5?

Cheers

1 post - 1 participant

Read full topic

Understanding Changes to Capacitor 3 core plugins

$
0
0

Originally published at: https://ionicframework.com/blog/understanding-changes-to-capacitor-3-core-plugins/

When we announced Capacitor 3.0 beta last week, one of the biggest changes we mentioned was around the core Capacitor APIs. All officially supported plugins are now installed and versioned separately from Capacitor core. While this may seem like a pretty drastic change, the migration is fairly straight forward. With these changes, developers actually have…

2 posts - 1 participant

Read full topic

Unable to run ionic build (Error)

$
0
0

When I run ionic build, this pops up.

This is my package.json.

{

“name”: “jom-study”,

“version”: “0.0.0”,

“license”: “MIT”,

“angular-cli”: {},

“scripts”: {

"ng": "ng",

"start": "ng serve",

"test": "ng test",

"pree2e": "webdriver-manager update --standalone false --gecko false",

"e2e": "protractor"

},

“private”: true,

“dependencies”: {

"@angular/common": "^2.3.1",

"@angular/compiler": "^2.3.1",

"@angular/core": "^2.3.1",

"@angular/forms": "^2.3.1",

"@angular/http": "^7.2.16",

"@angular/platform-browser": "^2.3.1",

"@angular/platform-browser-dynamic": "^2.3.1",

"@angular/router": "^3.3.1",

"@capacitor/android": "^2.4.6",

"@capacitor/cli": "^2.4.6",

"@capacitor/core": "^2.4.6",

"@ionic/angular": "^5.5.2",

"core-js": "^2.4.1",

"rxjs": "^5.0.1",

"ts-helpers": "^1.1.1",

"zone.js": "^0.7.2"

},

“devDependencies”: {

"@angular/compiler-cli": "^2.3.1",

"@types/jasmine": "2.5.38",

"@types/node": "^6.0.42",

"angular-cli": "1.0.0-beta.28.3",

"codelyzer": "~2.0.0-beta.1",

"html-webpack-plugin": "^4.5.1",

"jasmine-core": "2.5.2",

"jasmine-spec-reporter": "2.5.0",

"karma": "1.2.0",

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

"karma-cli": "^1.0.1",

"karma-jasmine": "^1.0.2",

"karma-remap-istanbul": "^0.2.1",

"protractor": "~4.0.13",

"ts-node": "1.2.1",

"tslint": "^4.3.0",

"typescript": "~2.0.3",

"webpack": "^5.16.0",

"webpack-dev-server": "^3.11.2"

}

}

When I run ng help to check more information, this shows:

Please help, it’s urgent. Thank you in advance. :slight_smile:

1 post - 1 participant

Read full topic

Viewing all 70904 articles
Browse latest View live


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