Adding Application class to project
Closed this issue · 1 comments
TLDR: how do you add the application class to cordova project as mentioned in the quirks section?
Is there a way to save it to the config.xml? or something similar, so I can share the fix?
Ah I figured it out. Incase anyone finds this:
I'm not sure how to persist it, but you can edit what classes get made direction in the /platform/android/src/
directory
I'm using ionic, and it makes a package already called com.ionicframework.<appname>
which corresponds to /platform/android/src/com/ionicframework/<appname>
-
Make a file
App.java
in/platform/android/src/com/ionicframework/
-
Insert the information found on the
READ.ME
and replace the package name appropriately at top -
In the android manifest add the
android:name
attribute to the<application>
tag with the value '.App' assuming you're using the package ionic makes for you. Otherwise I'm pretty sure you have to use the fully qualified name ofcom.ionicframework.mypackage
Should look like this ```<application android:name=".App" ... > ...</application
Hope that helps someone!