Crashlytics:Upload a Cordova project - android

The Crashlytics say we need to download the Fabric Plugin on Android Studio and then register/upload the app by running it. I have few questions about the same topic.
How to upload a Cordova (Ionic) based project to Crashlytics?
How to use this cordova-crashlytics plugin?
Any help is very helpful.

This can be done without Android Studio and without "uploading your app/project" to Crashlytics and without having their Fabric plugin. I'm working on a Cordova app using the Cordova CLI tool with Cordova Android platform 3.7.2. I got Crashlytics working by usign this slightly updated Cordova plugin: https://github.com/smistry-toushay/cordova-crashlytics-plugin
First get your Crashlytics Secret and Key by visiting the "Organizations Page" in your Crashlytics dashboard. Select your org at: https://www.crashlytics.com/settings/organizations and click on the links for "API Key" and "Build Secret" right underneath the org's name to copy those values.
Then run this on a command line in your Cordova directory:
cordova plugin add https://github.com/smistry-toushay/cordova-crashlytics-plugin.git --variable CRASHLYTICS_API_SECRET=YOUR CRASHLYTICS API SECRET HERE --variable CRASHLYTICS_API_KEY=YOUR CRASHLYTICS API KEY HERE
That should then add your Cordova App to the Crashlytics dashboard and any subsequent crashes will show up there.

Since developing ionic uses text editors only, and not IDE, we don't really use the android studio. However, for this special case, where native should immerse We will need to force build our app from studio.
What you can do is to
add android platform to cordova app.
import app to Android studio (File, Import Project, yourapp/platform/android)
follow the instruction from Crashlytics.
You can now proceed with your API keys and Build Secret.
on cli, follow the code to add the plugin "cordova plugin add cordova-..."
run the app on android studio.
Please let me know if this helps.
I was able to do this before, but I'll try to help you out everytime.
Cheers!

Related

Capacitor Quasar "Geolocation" plugin is not implemented on android

I added capacitor via the quasar framework. I didn't add any plugin at first and everything worked perfectly. Then I updgraded to capacitor v3. I followed the guide and my app worked also without any problems. Then I added the geolocation plugin to capacitor. It works as expected in the browser, but when I try it on my native android device it gives me this error:
"Geolocation" plugin is not implemented on android
It looks like I didn't install the plugin, but as I said, it works in the browser.
Ok fixed it, by checking both package.json files (also the one in /src-capacitor). I used capacitor 3 in my web project but capacitor 2 in my capacitor project. I wanted to use v3 so I tried to access the plugin in the way of capacitor v3 which did not work.
This is because Capacitor changes the underlying Gradle files but Android Studio doesn't know.
To fix this, go to Android studio click File -> Sync Project with Gradle Files

Local notifications with "cordova-plugin-local-notifications" plugin

I am trying to add the cordova-plugin-local-notifications plugin to my android project.
I am adding implementation 'com.github.katzer:cordova-plugin-local-notification'under dependencies, into my app gradle file. But Gradle can't find the plugin.
Error: Supplied String module notation 'Failed to resolve: com.github.katzer:cordova-plugin-local-notification:
Plugin link: https://github.com/katzer/cordova-plugin-local-notifications/
Thank you for your help.
You need to follow steps from tutorial:
https://cordova.apache.org/docs/en/latest/guide/cli/
Here you may find how to install Android if not yet:
https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html#requirements-and-support
and how to install plugins.
You haven't installed the plugin properly. You have not even installed the Cordova CLI properly, according to your comments.
If you are new to Cordova, I strongly recommend you to try an IDE like Visual Studio with the tools for Apache Cordova and set it up following this guide. Plugins must be properly installed before they can be used in your apps, and of course Cordova needs to be installed first.

Cordova based project to Fabric

I am searching for "Crash Analytics and Monitoring tools" for my Cordova (Ionic) based project.
There is a cordova-fabric-io-plugin on Github
https://github.com/engincancan/cordova-fabric-io-plugin.
I did changes according to instructions and also i installed intellij plugin to my IDE "intellij idea".Now when i click on fabric icon to upload it asks for Android Project as shows in below image link
http://i.stack.imgur.com/HVtL4.png
How to upload a Cordova (Ionic) based project to Fabric?
1) Open Android Studio or IntelliJ.
2) Ensure to install the Fabric plugin for Android Studio or IntelliJ.
3) Import the Android project present inside platforms/android folder of your cordova project.
4) Once imported Fabric should recognize the project and add the fabric SDK.

Adding Dialogs Plugin to phonegap project prevents deviceReady from Firing

I started using phonegap but as a beginner i ran into many problems.
one of the latest is problem with adding plugins
I added plugin of dialogs
org.apache.cordova.dialogs
with command line tool and it added successfully . but after running application in android emulator it never fire deviceReady Event. before adding plugin it was OK.
as a note I should say I installed older versions of plugin but they didn't work either !
Well I found the answer , I was building my project with phonegap but installed cordova plugins , I create a new project with command
cordova create project [folder name] [namespace "like com.example.appname"]
[project name]
and it worked correctly after that and I installed plugins as usual .

IntelliJ cordova angularjs logs console

I created a new cordova project with angularjs with ng-cordova and ionic from a command-line.
I'm able to open this project with IntelliJ, but I must launch the app with a commandline :
cordova run android
The problem is that I don't have any logs, I don't have any log console.
How should I do to see a console log ?
Thanks
Just add the following plugin:
cordova plugin add org.apache.cordova.console
& then type console.log('123');
You would be able to see console logs in 'android monitor'

Categories

Resources