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.
Barcode reader crashes the app after permission request
Exclude ionic components from built files
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
ok thanx i will check this.
Attribute meta-data#com.google.android.geo.API_KEY@value at AndroidManifest.xml requires a placeholder substitution but no value for is provided
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
@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
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
I have the same Issue.
Apple new Guideline 4.7 - html5 banned?
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
thankx for this solution.
Ionic cordova plugin add ionic-plugin-deeplinks Variable(s) missing (use: --variable URL_SCHEME=value --variable DEEPLINK_HOST=value)
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.1Cordova:
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.2System:
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
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
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
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
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
place this command in config.xml It worked for me
Newbie Question about IONIC App
Short answer Yes!
Google Firebase is a great option for the data side of the app as well.
There are a ton of resources out there for you to draw upon. I have my book at: https://ionic-book.com/. Also check out https://ionicframework.com/community. There are several other community members producing great work.
Good Luck!
Ionic 4 Input with icon
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
<engine name = ""android spec = “^8.0.0”/>
Video live streaming
We made a really simple MJPG based app, available with source here: https://github.com/nabto/ionic-starter-nabto-video and in the App store and Google play. This blog post describes how to use the app with a Raspberry Pi cam: https://www.nabto.com/secure-app-access-to-raspberry-pi-camera/
If you manage to find a good and preferably still maintained Cordova RTSP player component, please post here (we did some research a while back and did not succeed).
Ionic 4 devapp debugging
Yes, I’m on a Mac. Using the terminal.