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

Barcode reader crashes the app after permission request

$
0
0

Its working when I deploy on my device with ionic cordova run android --device. But if I download the deploy from the app store it doesn’t work. And this is only regarding android. iOS works fine.


Exclude ionic components from built files

$
0
0

Hello,

I use stencil to create a components lib. Many of my components use ionic components like ion-input, etc…

The problem is that the built files include many (or even all) ionic components.

When I use my “lib” in an existing app (Ionic 4 + Angular) I get an error tab with id "undefined" does not exist because the IonTabs used is the one bundled with my components lib.

Is there a way to exclude ionic components from stencil output, so the main app takes care of loading ionic components ?

Thanks

Convert image into multipart and send to post server with key in ionic3

Attribute meta-data#com.google.android.geo.API_KEY@value at AndroidManifest.xml requires a placeholder substitution but no value for is provided

$
0
0

When doing an Android build on AppFlow, I get errors while trying to build the AndroidManifest.xml file. My last good Android build was early April. I don’t have the build issue local. It happens with 2.6.2 of the cordova-plugin-googlemaps.

I’ve tried various combinations of the following:

Adding inside the “widget” element:

   preference name="API_KEY_FOR_ANDROID" value="xxx" 
   preference name="GOOGLE_MAPS_ANDROID_API_KEY" value="x"

This produces the “missing” error.

Adding in the platform tag for android:

        <config-file parent="/manifest/application" target="app/src/main/AndroidManifest.xml">
            <meta-data android:name="com.google.android.geo.API_KEY" android:value="xxx" />
        </config-file>

This produces both the missing and a duplicate. So I think the platform tag is maybe the way to go but I can’t find out where the empty element is getting added from.

I’ve also tried removing the elements inside the actual plugin element thinking maybe that’s where the empty was coming from.

I’ve seen a few posts with this error and either no solutions or have tried the solutions suggested – anyone have any ideas?

In app purchase 2 not working on production

$
0
0

@ganeshpragasam @rajputsachin @lolaswift

I’ve made it cleaner over time but it’s essentially still the same. You will need to follow the steps as provided in the cordova plugin meaning uploading an signed build with billing key and permissions in it. Cordova will do this for you, but on capacitor it needs to be done manually. After the cordova stuff is done, this code is all I need:

import {InAppPurchase2, IAPProduct} from '@ionic-native/in-app-purchase-2/ngx';
import {AdmobService} from './admob.service';

@Injectable({
    providedIn: 'root'
})
export class PremiumService {
    product;

    constructor(public iap2: InAppPurchase2, private admob: AdmobService) {
    }

    setup() {
        this.iap2.register({
            id: 'adfreenew',
            alias: 'Ad free',
            type: this.iap2.PAID_SUBSCRIPTION
        });
        this.product = this.iap2.get('adfreenew');
        this.registerHandlersForPurchase('adfreenew');

        // restore purchase
        this.iap2.refresh();
    }

    getProduct() {
        return this.product;
    }

    subscribe() {
        this.registerHandlersForPurchase('adfreenew');
        this.iap2.order('adfreenew');
        this.iap2.refresh();
    }



    registerHandlersForPurchase(productId) {
        this.iap2.when(productId).owned((product: IAPProduct) => {
            // alert(` owned ${product.owned}`);
            product.finish();
            this.admob.disableAds();
        });

        this.iap2.when(productId).approved((product: IAPProduct) => {
            // alert('approved');
            this.admob.disableAds();
        });

        this.iap2.when(productId).refunded((product: IAPProduct) => {
            // alert('refunded');
        });

        this.iap2.when(productId).expired((product: IAPProduct) => {
            // alert('expired');
        });
    }
}

By running this at app startup, I make sure the subscription is still active (It will only fire .owned or .approved), to answer @lolaswift’s answer.
So a day after first upload to Google Play, if everything is configured correctly, this will work but only on a signed apk (preferly by downloading the derived apk from play console, or released version from play store)

Barcode reader crashes the app after permission request

$
0
0

Sorry I don’t know, it is strage.
However on Google Play where you published the App you can see if your device is compatible with the App.
In addition I don’t know if is possible to enable a sort of crash report.

I had to add also this code to the config.xml file:

    <plugin name="phonegap-plugin-barcodescanner" spec="^8.0.1">
        <variable name="CAMERA_USAGE_DESCRIPTION" value="Needed to read QRCode and to takes pictures" />
    </plugin>

Bug in Ionic Studio 0.0.63

Apple new Guideline 4.7 - html5 banned?

$
0
0

According to the new Apple guidelines from here: https://developer.apple.com/news/?id=06032019j

Guideline 4.7.** HTML5 games distributed in apps may not provide access to real money gaming, lotteries, or charitable donations, and may not support digital commerce. This functionality is only appropriate for code that’s embedded in the binary and can be reviewed by Apple. This guideline is now enforced for new apps. Existing apps must follow this guideline by September 3, 2019.

Do you think it will affect ionic applications or only those that load content in iframe?


In app purchase 2 not working on production

Ionic cordova plugin add ionic-plugin-deeplinks Variable(s) missing (use: --variable URL_SCHEME=value --variable DEEPLINK_HOST=value)

$
0
0

Hello

During the installation of “deeplinks” with the command
ionic cordova plugin add ionic-plugin-deeplinks
fails:
Variable(s) missing (use: --variable URL_SCHEME=value --variable DEEPLINK_HOST=value).

Ionic:

Ionic CLI : 5.0.1 (C:\Users\coco\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.4.2
@angular-devkit/build-angular : 0.8.9
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.0.0, ios 5.0.1
Cordova Plugins : cordova-plugin-ionic-webview 2.2.3, (and 10 other plugins)

Utility:

cordova-res : 0.3.0
native-run : 0.2.2

System:

NodeJS : v10.0.0 (C:\Program Files\nodejs\node.exe)
npm : 6.9.0
OS : Windows 10

I can run
ionic cordova plugin add ionic-plugin-deeplinks --variable URL_SCHEME=example --variable DEEPLINK_SCHEME=https --variable DEEPLINK_HOST=midomain.com
and it works, but before I could run it without the variables and add them later in the “config.xml” file

Barcode reader crashes the app after permission request

$
0
0

I have this line in the config.xml file. A colleague of mine was able to find a stack trace:

2019-06-07 14:27:02.892 16572-16629/? E/AndroidRuntime: FATAL EXCEPTION: pool-1-thread-1
   Process: appName, PID: 16572
   android.content.ActivityNotFoundException: Unable to find explicit activity class {appName/com.google.zxing.client.android.CaptureActivity}; have you declared this activity in your AndroidManifest.xml?
       at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1978)
       at android.app.Instrumentation.execStartActivity(Instrumentation.java:1637)
       at android.app.Activity.startActivityForResult(Activity.java:4733)
       at org.apache.cordova.CordovaActivity.startActivityForResult(CordovaActivity.java:343)
       at android.app.Activity.startActivityForResult(Activity.java:4673)
       at org.apache.cordova.CordovaInterfaceImpl.startActivityForResult(CordovaInterfaceImpl.java:68)
       at com.phonegap.plugins.barcodescanner.BarcodeScanner$1.run(BarcodeScanner.java:204)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
       at java.lang.Thread.run(Thread.java:784)

So its probably something wrong with the plugin. I just was about to submit an issue on GitHub, but knowing that the ones from 2015 are still open, makes me want to ditch the plugin.

WebView on ionic 4

$
0
0

Webview does seem to work for me, and I cannot find solution on the web:
this.webView.convertFileSrc(url); returns undefined/app_file/…
the rest of the file is correct. I want to load local videos so I can play them on videogular2 if possible. How can I do this?

I have the following settings: ionic info
Ionic:

Ionic CLI : 5.0.1 (C:\Users\thula\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.4.2
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.0.1, (and 5 other plugins)

Utility:

cordova-res : 0.3.0
native-run : 0.2.2

System:

NodeJS : v10.16.0 (C:\Program Files\nodejs\node.exe)
npm : 6.9.0
OS : Windows 10

Newbie Question about IONIC App

$
0
0

Hello everyone, i come from the filemaker world and want to move on. We have created a little app to look after displaying a schedule of dances for a competition. here is a screen shot: http://www.tbcguy.com/dvpro/theviewlist.PNG. Now FMPro runs only IOS (iphone) for mobile devices. We could use web direct for android devices but that involves AWS or other server means. Or we need a server and tons of client licences. At any rate this is an app that has static data, display only…no user intervention apart from searching. There could be changes in the dance categories, times etc. But, that is controlled by someone in the backend. Right now we have it set up to use google sheets. The app checks to see if there are changes in the data, if so do an update and notify the user. Also if you notice, at the bottom above the menu bar there is a current dance. That is schedule based meaning it checks the current time and compares it to the data and displays the current dance. If there are discrepancies, which there are like falling behind or it runs smoothly and gets ahead. we can adjust that on another screen. I would like to move away from filemaker if possible and do this another way and this Ionic framework looks really slick. My hope is to design this in this framework. Using Appscript from google I have a firebase database set up that is synced to the google sheet. I am hoping that this framework can tie into Firebase realtime and display the data similar to the screen shot. Then my data on the phone will be updated all the time.

That brings me to my question. Is this possible using the IONIC / angular framework. I have basic programming skills…again a database guy. Thanks for your time.

Dave

PDF download approach

$
0
0

Hi I am new and looking for a reference to know the correct way to call Rest API and download PDF in android.
I tried FileSaver.saveAs function but it worked in from browser but not in mobile app. Appreciate your help.

No Cordova platforms listed in config.xml

$
0
0

place this command in config.xml It worked for me


Newbie Question about IONIC App

Ionic 4 Input with icon

$
0
0

Could you supply a graphic of exactly the layout you are seeking? Just want to be clear on what you want to do.

Thanks

No Cordova platforms listed in config.xml

$
0
0

<engine name = ""android spec = “^8.0.0”/>

Video live streaming

Ionic 4 devapp debugging

$
0
0

Yes, I’m on a Mac. Using the terminal.

Viewing all 228565 articles
Browse latest View live


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