Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Application class to project #8

Closed
ObjectiveTruth opened this issue Jul 6, 2015 · 1 comment
Closed

Adding Application class to project #8

ObjectiveTruth opened this issue Jul 6, 2015 · 1 comment

Comments

@ObjectiveTruth
Copy link

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?

@ObjectiveTruth
Copy link
Author

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>

  1. Make a file App.java in /platform/android/src/com/ionicframework/

  2. Insert the information found on the READ.ME and replace the package name appropriately at top

  3. 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 of com.ionicframework.mypackage

    Should look like this ```<application android:name=".App" ... > ...</application

Hope that helps someone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant