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

How to download image from app to phone gallery?

$
0
0

I have a mobile app that stores and displays photos, much like the Your First Ionic App example. What would be the best way to download these photos to my phone’s photo gallery? I am using Capacitor.

1 post - 1 participant

Read full topic


How to change or override primary color in Ionic 5?

$
0
0

Hi all,

Having a hard time to change:


root {
  /** primary **/
  --ion-color-primary: #3880ff;
  --ion-color-primary-rgb: 56, 128, 255;
  --ion-color-primary-contrast: #ffffff;
  --ion-color-primary-contrast-rgb: 255, 255, 255;
  --ion-color-primary-shade: #3171e0;
  --ion-color-primary-tint: #4c8dff;

in the variables.scss in Ionic 5. Whatever I do, I can’t change or override the primary color. Is this a known issue or am I doing something wrong here?

1 post - 1 participant

Read full topic

Getting location of iOS devices is inconsistent

$
0
0

I haven’t not been able to find an example of how to use cordova.plugins.diagnostic.requestLocationAuthorization in an Ionic 4 app.

Meaning, how to install the plugin and the import statement. I’ve created an Ionic 4 social media app and I’d like to prompt users for access to device location. It’s working fine in Android but iOS is not consistent. It will sometimes get the device location while testing on a real device and sometimes when I uninstall and redeploy it won’t. It just seems random at this point whether or not it retrieves and saves the device location to the backend for iOS devices. So I’d like to prompt users if I query the backend and don’t have their device location.

Any help would be greatly appreciated.

Again I’m using: Ionic -v 5.4.13

9.0.0 (cordova-lib@9.0.1)

I can actually use this.diagnostic.getLocationAuthorizationStatus() to get the autorization status from iOS. But I need a way to prompt users in case it’s not activated.

1 post - 1 participant

Read full topic

Ion-infinite-scroll in custom component v5

$
0
0

I have a list that takes up 50vh. I want to use infinite scroll on that list.
This doesn’t work. From reading the docs, it looks like <ion-infinite-scroll> is based off the scroll position in the page. I was hoping it was based off of whether or not the scroll element was rendered in viewport

I’ve created this demo:
https://ionic-v4-angular-tabs-lq95xj.stackblitz.io

All of the demo code is for tab1.

If you comment out tab1.scss height:

.top-half {
 // height: 50vh;
  overflow: scroll;
}

Then the expected functionality returns.

Is it possible to pass in the element I want to base the scroll position on?
Something like:

 <ion-list #scrollList></ion-list>

  <ion-infinite-scroll scroll="scrollList" threshold="100px" (ionInfinite)="loadData($event)" >

1 post - 1 participant

Read full topic

Cannot get past this:

$
0
0

] : Compiled successfully.
[ng]
[ng] ERROR in src/app/data.service.ts:3:17 - error TS2304: Cannot find name ‘environment’.
[ng]
[ng] 3 const apiUrl = environment.apiUrl;

1 post - 1 participant

Read full topic

Ionic app in Browser

$
0
0

Hi everyone I exported an ionic web project with the command
build --prod --base-href “url_web”

and everything is completed by copying the www folder file online but if i refresh the page or click it enters the browser bar i get an error 404, this does not happen when it is run ionic on the local host. How come this happens?

1 post - 1 participant

Read full topic

Ionic CLI linked to react-scripts

$
0
0

Hi all,

I see ionic CLI is linked to react-scripts (e.g., react-scripts build/serve). I’m using this for web app and mobile app.

I want to override webpack configuration using craco (https://github.com/gsoft-inc/craco) (e.g., craco build).

How can this be achieved or any other alternate solutions possible to use for both web / mobile builds/run/other commands. ?

Thanks,
Alex

1 post - 1 participant

Read full topic

How to make social sharing button in Ionic 5 use React Hooks

$
0
0

I’m use React Hooks capacitor and i want to make button social sharing but i don’t find a result to make it. Please help

1 post - 1 participant

Read full topic


Multiple language file for specific feature

$
0
0

Hi all,
I’d like to create multiple language file for specific features. Currently I have one file for each language:

en.json
it.json

and so on…

I’d like to have
en.json (core)
en-feature1.json
it.json (core)
it-feature1.json

How can I implement this scenario?

thanks

1 post - 1 participant

Read full topic

Help using Widgets with Ionic for a beginner

$
0
0

I have a recurring issue I am running into with ionic and that is bringing in widgets to my app. In this case, I am using this weather map from https://windy.app/widgets. With the code

<div
data-windywidget="map"
data-spotid="395499"
data-appid="bab357a22953d3068054a2dc5d3dea27"
data-newwindbar="true"
data-spots="true">
</div>
<script async="true" data-cfasync="false" type="text/javascript" src="https://windy.app/widget3/windy_map_async.js"></script>

I can’t get this code to display anywhere outside of the index.html due to the script. This has been a recurring issue with every piece of code with a script I want this to run on a specific HTML page for displaying weather but the code won’t display in any other HTML file than the index.html due to the script. Is there just something really obvious I am missing? As after a lot of research I cant find much on this issue.

1 post - 1 participant

Read full topic

Calling one page method to another page

$
0
0

Hi,

I have two pages one contacts and another one contacts history.

To avoid the reputation of code, i am calling contact method in contacts history page.

using declare var window and window.contacts=this; in contacts page.

and contact history page again declare var window. and calling the method

window.contacts.gethistory(id) when i first render in contacts page and go to contacts history page click the button that time contact method calling successfully. if i render the contacts history directly and click the button means the below error is coming

ERROR TypeError: Cannot read property ‘gethistory’ of undefined. How to solve this.

Thanks in Advance

Regards,
Ramji

1 post - 1 participant

Read full topic

Can not bind value to ion-radio-group via form controll in reactive forms

$
0
0

When i try to bind vale to ion-radio-group via formcontroll in reactive forms,
value that i set to formcontroll is assigned properly, but the interfaces is not updated.how can i fix this?

1 post - 1 participant

Read full topic

Android emulator does not show variables in console.log

$
0
0

When I run my capacitor/vuejs app in the android emulator I see the string text of the console.log, but not the variables.
For example console.log(“TestingUI is now”, state.TestingUI); shows just "“TestingUI is now”. TestingUI is a boolean and it is set to true or false. I know that it is set, because my code reacts to the variable. It runs fine as a PWA in Chrome.

I figure this has to work for most people and I just need to configure something differently. How can I fix this?

1 post - 1 participant

Read full topic

Ionic 5: Ion-select-option Change Style using NgClass

$
0
0

Hello ,
I’m trying to change the color of text in Ion-select-option with ngClass (Ion-select : interface=“action-sheet”)
but without any success.

        <ion-item>
          <ion-label>{{'TIME'| translate}}</ion-label>
          <ion-select color="green" formControlName="canteen" (ionChange)="changeTime()" interface="action-sheet" style="max-width: 100%" [cancelText]="cancel">
            <ion-select-option *ngFor="let time of crns" value="{{time.idct}}" [ngClass]="{
              'ion-select-red': time.subs<=0 ,
              'ion-select-green': time.subs>0
            }" [disabled]="time.subs<=0">
              {{time.creneau}} </ion-select-option>
          </ion-select>
        </ion-item>
.ion-select-red {
    --color: var(--ion-color-danger);
}

.ion-select-green {
    --color: var(--ion-color-green);
}

Any help please.

1 post - 1 participant

Read full topic

CompileAssetCatalog error for brand new project

$
0
0

Here’s what I tried:

% ionic start myApp tabs --capacitor --type=ionic-angular
% cd myApp
% ionic serve
% ionic cap add ios
% ionic cap open ios

% ionic info

Ionic:

Ionic CLI : 6.10.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : ionic-angular 3.9.9
@ionic/app-scripts : 3.2.4

Capacitor:

Capacitor CLI : 2.2.0
@capacitor/core : 2.2.0

Utility:

cordova-res : not installed
native-run : not installed

System:

NodeJS : v10.17.0 (/usr/local/bin/node)
npm : 6.14.4
OS : macOS Catalina

XCode: choose team in Signing and Capabilities, then build

Error: “Command CompileAssetCatalog failed with a nonzero exit code”

1 post - 1 participant

Read full topic


Downloaded Android app from play store shows keep stopping when trying to open the app

$
0
0

I have uploaded my updated apk in play store. Now it is in live. I just dowloaded my apk and try to open it. It shows application keeps on stopping with following summary.

E/AndroidRuntime: FATAL EXCEPTION: main

java.lang.RuntimeException: Unable to create application com.gae.scaffolder.plugin.Application: com.gae.scaffolder.plugin.MessageGuardException_RFA6IDMwNA: DP: 304 (RmluZ2VycHJpbnQgMjAxOTA3MDIgWy4rKysrLl0gYXJtZWFiaS12N2E6YXJtZWFiaS12N2EgMjYvMi4xLjAvLSBtb3Rvcm9sYS9hbGkvYWxpOjguMC4wL09QUzI3LjgyLTQ1LzU2OnVzZXIvcmVsZWFzZS1rZXlz)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5838)
    at android.app.ActivityThread.-wrap1(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1674)
    at android.os.Handler.dispatchMessage(Handler.java:105)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6592)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:769)
 Caused by: com.gae.scaffolder.plugin.MessageGuardException_RFA6IDMwNA: DP: 304 (RmluZ2VycHJpbnQgMjAxOTA3MDIgWy4rKysrLl0gYXJtZWFiaS12N2E6YXJtZWFiaS12N2EgMjYvMi4xLjAvLSBtb3Rvcm9sYS9hbGkvYWxpOjguMC4wL09QUzI3LjgyLTQ1LzU2OnVzZXIvcmVsZWFzZS1rZXlz)
    at com.gae.scaffolder.plugin.Application.onCreate(Unknown Source:169)
    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1140)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5835)
    at android.app.ActivityThread.-wrap1(Unknown Source:0) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1674) 
    at android.os.Handler.dispatchMessage(Handler.java:105) 
    at android.os.Looper.loop(Looper.java:164) 
    at android.app.ActivityThread.main(ActivityThread.java:6592) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:769) 
 Caused by: java.lang.UnsatisfiedLinkError: DP: 304
    at com.gae.scaffolder.plugin.Application$Application.wuxig(Unknown Source:690)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.gae.scaffolder.plugin.Application$Application.Honlx(Unknown Source:99)
    at com.gae.scaffolder.plugin.Application$Application.loqunIlzz(Unknown Source:201)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.gae.scaffolder.plugin.Application.onCreate(Unknown Source:117)
    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1140) 
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5835) 
    at android.app.ActivityThread.-wrap1(Unknown Source:0) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1674) 
    at android.os.Handler.dispatchMessage(Handler.java:105) 
    at android.os.Looper.loop(Looper.java:164) 
    at android.app.ActivityThread.main(ActivityThread.java:6592) 

Can anyone please help me? Thanks in advance

1 post - 1 participant

Read full topic

Ionic native http

$
0
0

Hello,
I’m using the plugin for http requests

this.http.post(apiUrl, data, {});

I have an issue because data would be an object but i need pass a json. I don’t have access to backend and I have to stringify two times my object for a succesful response.

1 post - 1 participant

Read full topic

Open facebook in IOS - Validate if it exists

$
0
0

I am trying to validate if facebook exists before opening it, but in IOS the code does not work, it does not validate if it exists.

  openAppUrl(app: string, name: string, id?: string) {
    switch (app) {
        case 'facebook':
            this.launchApp(
              'fb://',
              'com.facebook.katana',
              'fb://profile/' + id,
              'fb://page/' + id,
              'https://www.facebook.com/' + name);
            break;
        case 'instagram':
            this.launchApp(
              'instagram://',
              'com.instagram.android',
              'instagram://user?username=' + name,
              'instagram://user?username=' + name,
              'https://www.instagram.com/' + name);
            break;
        case 'twitter':
            this.launchApp(
              'twitter://',
              'com.twitter.android',
              'twitter://user?screen_name=' + name,
              'twitter://user?screen_name=' + name,
              'https://twitter.com/' + name);
            break;
        case 'youtube':
            this.launchApp(
              'youtube://',
              'com.google.android.youtube',
              'https://www.youtube.com/channel/' + name,
              'https://www.youtube.com/channel/' + name,
              'https://www.youtube.com/channel/' + name);
            break;
        default:
            break;
      }
  }

  private launchApp(iosApp: string, androidApp: string, appUrlIOS: string, appUrlAndroid: string, webUrl: string) {
    let app: string;
    let appUrl: string;

    if (this.platform.is('ios')) {
      app = iosApp;
      appUrl = appUrlIOS;
    } else if (this.platform.is('android')) {
      app = androidApp;
      appUrl = appUrlAndroid;
    } else {
      const browser: InAppBrowserObject = this.iab.create(webUrl, '_system');
      return;
    }
    this.appAvailability.check(app).then(
        () => {
            // success callback, the app exists and we can open it
            const browser: InAppBrowserObject = this.iab.create(appUrl, '_system');
        },
        () => {
            // error callback, the app does not exist, open regular web url instead
            const browser: InAppBrowserObject = this.iab.create(webUrl, '_system');
        }
    );
  }

1 post - 1 participant

Read full topic

Does Ionic work better w Angular vs React?

$
0
0

Hi there,

We’re about to start a new project and we’ve decided on Ionic, but are unsure whether to build using React or Angular. Does Ionic work better with one vs the other?

Also we’re hiring a frontend engineer if you’re interested in working on this project! Our company, PenPal Schools, connects students from over 150 countries to learn together online. Here’s the link to learn more and apply.

Thanks!

1 post - 1 participant

Read full topic

Hiring frontend dev for app that connects students around the world

$
0
0

Hi there,

PenPal Schools is hiring a Frontend Software Engineer. This is a unique opportunity to assume a role in one of the world’s fastest-growing education companies. Learn more and apply here.

About PenPal Schools:

PenPal Schools connects students from around the world to learn together! Students collaborate through online projects ranging from human rights and the environment to fake news and robotics, all while practicing literacy, technology and social-emotional skills. PenPal Schools is so effective in increasing student engagement and learning outcomes that our program has won numerous high-profile awards, was recognized by President Obama, and has grown to half a million students in 150 countries. Learn more at penpalschools.com

About the Position:

We are hiring a frontend engineer with 4+ years of experience to help us build a new version of our web app from the ground up. This position is remote until the COVID-19 crisis comes to an end, at which time we will work together again as a team in our Austin Texas office.

Requirements

Qualified candidates will have 4+ years of software development experience including:

  • HTML, CSS, and Javascript
  • React or Angular
  • Ionic

Nice-to-haves:

  • Django
  • Material Design
  • AWS Architecture

Benefits

  • Join a fun and high-performing team that is passionate about our work
  • Earn a competitive salary commensurate with experience
  • Earn equity in one of the world’s fastest-growing education technology companies
  • Experience work at a fast-paced company with an awesome social mission

Apply for this job

1 post - 1 participant

Read full topic

Viewing all 71531 articles
Browse latest View live


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