Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/starikcetin/eflatun.androidmanifesthook

Utilities for hooking into AndroidManifest.xml generation in Unity.
https://github.com/starikcetin/eflatun.androidmanifesthook

Last synced: 16 days ago
JSON representation

Utilities for hooking into AndroidManifest.xml generation in Unity.

Awesome Lists containing this project

README

        

# Eflatun.AndroidManifestHook
Utilites for hooking into AndroidManifest.xml generation in Unity.

## Installation

1. Get this: https://github.com/mob-sakai/UpmGitExtension

2. Install this repo from Unity Package Manager window, inside Unity.

## Usage

```cs
using Eflatun.AndroidManifestHook;

public class TestManifestHook : AndroidManifestHooker
{
protected override void Modify(AndroidManifest androidManifest)
{
var value = androidManifest.SetAttributeWithAndroidNamespace(androidManifest.ApplicationElement, "foo", "bar");
}
}
```

The code above will result in this:
```xml
...

...
```

You need to create an asmdef file with:

1. only Editor platform selected
2. a reference to Eflatun.AndroidManifestHook asmdef

for your manifest hooker scripts. Otherwise you will get build errors.

It should look like this:

![asmdef screenshot](https://raw.githubusercontent.com/starikcetin/Eflatun.AndroidManifestHook/repo-res/asmdef.png)

## License

MIT license. Refer to the [LICENSE](/LICENSE) file.

Copyright (c) 2019 S. Tarık Çetin.

This library is basically a convinience wrapper around [this StackOverflow answer](https://stackoverflow.com/a/54894488/6301627) by [pale bone](https://stackoverflow.com/users/7613702/pale-bone).