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

Image sharing issue with Ionic social share plugin

$
0
0

@kamal-lab wrote:

I’m trying to send image directly to a Whatsapp number using shareViaWhatsAppToReceiver method in ‘Ionic social share’ plugin.But text only set into a receiver’s chat screen and image eliminated.

However image sending working if I use shareViaWhatsApp method where is no option to set receiver. Is there any issue with ionic plugin or I need to send image in any other format? I tried to send from asset and also tried encodeURIComponent from url.

This is working

this.socialSharing.shareViaWhatsApp('Hello', shareImage);

This ignores image
const number = '+9198765XXXXX'; this.socialSharing.shareViaWhatsAppToReceiver(number, 'Hello, this.shareImage);

Note: I create image from html and sending it as base64 string.

Posts: 1

Participants: 1

Read full topic


Css utilities woe. ion-align-items-stretch

$
0
0

@OhNoNotScott wrote:

I’m trying to get two side by side cards to have the same height even though they have differing amounts of text content. And thus far using the css utilies of ion-align-items-stretch or ion-align-self-stretch is failing me. I feel like I’ve stuck them everywhere I possibly can but I get no joy. But others like ion-align-items-end or ion-align-items-center seem to work just fine.

I’m guessing it has something to do with the way a card works. What can I do here?

<ion-grid>
        <ion-row class="ion-align-items-stretch">
            <ion-col size-md="4" offset-md="2">
                <ion-card class="service-card">
                    <ion-card-header class="ion-text-center">
                        <ion-card-title>Less Content</ion-card-title>
                    </ion-card-header>
                    <ion-card-content>
                        <p>
                            Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
                        </p>
                    </ion-card-content>
                </ion-card>
            </ion-col>
            <ion-col size-md="4">
                <ion-card class="service-card">
                    <ion-card-header class="ion-text-center">
                        <ion-card-title>More Content</ion-card-title>
                    </ion-card-header>
                    <ion-card-content>
                        <p>
                            Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
                        </p>
                    </ion-card-content>
                </ion-card>
            </ion-col>
        </ion-row>...

Posts: 1

Participants: 1

Read full topic

Set as phone wallpaper

$rootScope replacement in ionic5

Check if device can vibrate

$
0
0

@Spica2 wrote:

I can check if Haptics is available:

import { Capacitor, Plugins } from '@capacitor/core';
const { Haptics } = Plugins;

const HapticsIsAvailable = Capacitor.isPluginAvailable('Haptics');
console.log("HapticsIsAvailable: " + HapticsIsAvailable)

Ho to check, if the device can vibrate?

Posts: 1

Participants: 1

Read full topic

Right way to create a website (stencil vs ionic)

$
0
0

@aleksanderd wrote:

Hi!

I wasted a lot of time to find some stack to building websites, tried react/nextjs, vue/nuxtjs + several UI libs for each. Also, svelte is tried, but there is some problems(mostly with typescript).

I just found the stencil and it looks like I searching for! Thank you!

But I confused with positioning of it…

If I want to use ionic too, what is better to create a new website: npm init stencil or @ionic/cli?
While ionic written using stencil, why there is no option to use stencil as well as react/angular in ionic start?

Also, there is @stencil/store, which hints it is possible to use stencil without redux/etc. Will stencil grow to standalone framework or so? Is there plans for something like nextjs/nuxtjs?

Thank you!

Posts: 1

Participants: 1

Read full topic

Electron - falling at the first hurdle

$
0
0

@paulbutcher wrote:

I’m very new to Ionic, so please forgive me If I’m missing something basic. I’ve got a long way towards getting my app working on web, iOS and Android. I’m now trying to get it to work with Electron, and hitting problems. So I decided to go back to basics and see if I could get a project created by ionic start working. And the answer is no :frowning_face:.

If I run the following:

ionic start MyTestApp --type react blank
cd MyTestApp
ionic build
ionic cap add electron
ionic cap open electron

It fails with:

index.html:1 GET file:///static/css/12.8921c4c4.chunk.css net::ERR_FILE_NOT_FOUND

The problem seems to be that the generated React project is expecting to find files in the root directory, where Electron is loading them using absolute file: URLs. I’ve tried playing around with setting homepage in package.json and removing the <base> tag in index.html with some success (I can get the static files loading initially), but I rapidly run into more problems.

This problem doesn’t seem to be React specific—I see similar issues if I create an Angular project instead.

Should I expect this to work? Are there any examples that I can look at of getting Ionic to play nicely with Electron?

Posts: 1

Participants: 1

Read full topic

Set app name in environment

$
0
0

@wiesingerh wrote:

Hi all,

i have a stage and a prod environment in my project, is it possible to set there the app name and also the app id?

i was looking throug the docs but couldnt find anything :frowning:

also a manipulation of the app icon would be interesting :slight_smile:

best regards
harald

edit: i tried to put it in the command line while building… ionic cordova build android --release --variable APP_NAME=“STAGE”
but it seems this is not used

Posts: 1

Participants: 1

Read full topic


Schedule task weekly

$
0
0

@felixlr7 wrote:

Hi,

I have been searching for related topics but I didn’t find any which help me. I want to schedule a task to do each week (even if I can, each two weeks). I was seeing about BackgroundMode plugin, but I read it’s not for long periods like this (battery life). I found about Background task in Capacitor (https://capacitor.ionicframework.com/docs/apis/background-task/), but I think it’s the same proble (or maybe not). Any idea?

Thanks a lot in advance!

Posts: 1

Participants: 1

Read full topic

Partially hiding an ion-card on content scroll

$
0
0

@ndukayames wrote:

I have a ion-card element with an image, description and details field inside the card element then a long list of items under the card, how do I partially hide the ion-card and leave the image at the top, while the user scroll through item below the card, and also pull up the ion card fully when the user scroll back to the top of the screen?

Posts: 1

Participants: 1

Read full topic

Phonegap/ionic -push doesn't play custom audio at all!

$
0
0

@navinpandey wrote:

phonegap-push doesn’t play custom audio. Its just not happening.

  1. mysound.wav file is in /res/raw
  2. a channel id:‘1’ is created with sound: ‘mysound’
  3. fcm sends ‘soundname:musound’ and ‘android_channel_id:1’

What can be wrong! Searched all google with no luck! Did it ever work for anyone?

Posts: 1

Participants: 1

Read full topic

Style ionic card list

$
0
0

@kn01 wrote:

I am trying to create a contact list on Ionic 5, using angular, but it is not possible to access this style. can you help me? How to leave a rendered image at the beginning of the card, with a icon and header and a icon with subheader, as in the image below?

Captura de Tela 2020-05-17 às 12.29.06

my code:

<ion-content padding>
  <ion-card>
    <ion-grid>
     <ion-row>
      <ion-col>
        <img src="https://material.angular.io/assets/img/examples/shiba1.jpg" style="border-radius: 50%; width: 80%; height: 85%">
      </ion-col>
    <ion-col>
        <ion-item>
          <p>Marty McFly</p>
        </ion-item> 
        <ion-card-content>
          <ion-item>
            <ion-icon></ion-icon>
            <p>Wait a minute. Wait a minute, Doc. Uhhh</p>
          </ion-item>
      </ion-card-content>
    </ion-col>
     </ion-row>
    </ion-grid>
  
  </ion-card>

</ion-content>

my page:

thanks =)

Posts: 1

Participants: 1

Read full topic

Http.get not resolved when route param changes

$
0
0

@alkahtani wrote:

I have an issue to figure out why http.get working only in first call but nothing happed when i use back button and route again to the same page “only first rout resolve date and if use back button and route again with new route parameter http.get not get any data”.

Service Code

public getListingDataSource(slug: string): Observable<FoodListingModel> {
     console.log('service : get param  ' , slug ); 
  // i have an issue here , this return wont executed when route param changed , it resolved in the first time only.
     return this.http.get<FoodListingModel>('./assets/sample-data/food-listing/listing.json')
     .pipe(map(res => {
       const items = res.items.filter(item => item.slug === slug);
       res.items = items;
       return res;
     })) ;
    }

Resolver code

resolve(route: ActivatedRouteSnapshot ) {
    const  itemSulg = route.paramMap.get('categoryId');
    const  dataSource: Observable<FoodListingModel> = this.foodListingService.getListingDataSource(itemSulg);
    const  dataStore:  DataStore<FoodListingModel> = this.foodListingService.getListingStore(dataSource);
    return dataStore;
  }

.page.ts code

this.route.data.subscribe((resolvedRouteData) => {
      const listingDataStore = resolvedRouteData['data'];
      listingDataStore.state.subscribe(
        (state) => {
          this.listing = state;
        },
        (error) => {
          console.log(error);
        }
      );
    },
    (error) => {
      console.log(error);
    });

module.ts

const routes: Routes = [
  {
    path: '',
    component: FoodListingPage,
    resolve: {
      data: FoodListingResolver,
    },
    runGuardsAndResolvers: 'always',
  }
];

Posts: 1

Participants: 1

Read full topic

Error running ionic cordova resources

$
0
0

@umsuka wrote:

Hi

I am running ionic 3 for my application, its giving me issues when creating a new app via ionic start command.

× Uploading source images to prepare for transformations - failed!
HTTP Error 503: POST https://res.ionic.io/api/v1/upload

<!DOCTYPE html>
        <html>
          <head>
                <meta name="viewport" content="width=device-width, initial-scale=1">
                <meta charset="utf-8">
                <title>Application Error</title>
                <style media="screen">
                  html,body,iframe {
                        margin: 0;
                        padding: 0;
                  }
                  html,body {
                        height: 100%;
                        overflow: hidden;
                  }
                  iframe {
                        width: 100%;
                        height: 100%;
                        border: 0;
                  }
                </style>
          </head>
          <body>
                <iframe src="//www.herokucdn.com/error-pages/application-error.html"></iframe>
          </body>
        </html>

Posts: 1

Participants: 1

Read full topic

Image insertion support


PWA not working as expected in ionic

$
0
0

@divyasmehta wrote:

Hi, I am creating a pwa app in ionic. I have followed all steps correctly and ddeployed my app in https server. Yet I am facing these errors in audit tab of chrome.

I had this same project in normal angular earlier and this same manifest.json worked in that project. When I add same properties in ionic’s project, it gives me error.

Can anyone help me with this?

Posts: 1

Participants: 1

Read full topic

How do i make a production build?

$
0
0

@ersaurabh101 wrote:

I uploaded my app in appflow. It created a build, but its vendor.js size is 4mb. I want to create a production build using command like ionic build --prod , ionic build --aot

How do i do that in appflow ?

Posts: 1

Participants: 1

Read full topic

Creating a login page using mysql node js and ionic 4

$
0
0

@NthabyMogoboya wrote:

service.ts

private _adminLogin =“http://localhost:4000/admin_login”;
adminLogin(admin){
return this.httpClient.post(this._adminLogin,admin);
}

login.ts

login: any;
loginUserData = {
email_address: “”,
password: “”
};
constructor(private alertService: AlertService,private cartService: CartService,private router: Router) { }
ngOnInit() {
}
async signIn(){
if(this.loginUserData.email_address ==""){
this.alertService.presentToast(“Provide email”);
}else if(this.loginUserData.password ==""){
this.alertService.presentToast(“Provide password”);
}
this.cartService.adminLogin(this.loginUserData).subscribe(
_data => {
this.alertService.presentToast(“Logged In”);
},
error => {
console.log(error);
},
() => {
this.router.navigate([‘home’]);
}
);
}

login.html

    <form method="POST" (ngSubmit)="login(form)">
        <ion-grid >
          <ion-row class="cardconteudo" class="ion-justify-content-center">
            <ion-col class="ion-align-self-center" size-md="6" size-lg="5" size-xs="12" color="transparent">
              <div class="ion-padding" >
                <ion-item>
                  <ion-input [(ngModel)]="loginUserData.email_address" name="email_address" type="text" placeholder="Username/Name@email.com"></ion-input>
                </ion-item>
                <ion-item>
                  <ion-input [(ngModel)]="loginUserData.password" name="password" type="password" placeholder="Password"></ion-input>
                </ion-item>
              </div>
              <div class="ion-padding">
                <ion-button block  (click)="signIn()">Login</ion-button>
              </div>
            </ion-col>
          </ion-row>
        </ion-grid>
      </form>

I get this error when I click the login button

What is wrong with my code?

Posts: 1

Participants: 1

Read full topic

Push notification when app is not started yet

$
0
0

@lcrasson wrote:

Hello,

Is it possible to receive push notification even if the app is not started yet.
(ex. when the phone just power on )

Thanks in advance

Lionel

Posts: 1

Participants: 1

Read full topic

About 33% of login cases return Error 12501

$
0
0

@Stefane81 wrote:

About 33% of login cases return Error 12501, which I log with Sentry.
The error is triggered by:
googlePlusUser = await this.google.login(environment.googleParams)

I have so far been unable to reproduce this issue and the error happens on all major Android versions and devices. I am using Ionic4 with Firebase and the cordova-plugin-googleplus. https://github.com/EddyVerbruggen/cordova-plugin-googleplus

Note: Already have an unanswered issue ticket there and on stack-overflow.



Currently, the app is only available on Android.

import { GooglePlus } from '@ionic-native/google-plus/ngx';

[@Injectable](https://github.com/Injectable)({
providedIn: 'root',
})
export class FirebaseAuthService {
constructor(
private google: GooglePlus,
private fireAuth: AngularFireAuth,
...
) { }

async loginGoogle(that: any): Promise {
let googlePlusUser;
try {
googlePlusUser = await this.google.login(environment.googleParams);


  return await firebase
    .auth()
    .signInWithCredential(
      firebase.auth.GoogleAuthProvider.credential(googlePlusUser.idToken)
    )
    .then((response) => {
      this.firebaseDatabaseService.saveGoogleAuthData(response.user);
      this.router.navigate(['/tabs/home']);
    })
    .catch((error) => {
      console.log('inside loginGoogle then catch: ', error);
      Sentry.captureException(error);
    });
} catch (error) {
  console.log('outside loginGoogle then catch: ', error);


Sentry.captureException(error);
}

My environment googleParams are

googleParams: { 
webClientId: 'xxx.apps.googleusercontent.com', 
offline: false, 
}

I am at a loss of what the issue is and would be happy to add any further information if requested.

Posts: 1

Participants: 1

Read full topic

Viewing all 71285 articles
Browse latest View live


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