Skip to content

lumenkeyes/android-manifest-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A small project to automatically generate android manifest and resource files. This is a work in progress, I make no guarantees about its usability. Meant to be used with https://github.com/silbinarywolf/zig-android-sdk

Install with zig fetch --save git+https://github.com/lumenkeyes/android-manifest-helper

Example usage in build.zig:

const manifestHelper = @import("android_manifest_helper").Helper

// ...
// set up apk, etc.
// ...

const manifest = try manifestHelper.manifest.init(b, .{
    .apiLevel = <APPROPRIATE_API_LEVEL>,
    .packageName = "com.zig.<EXE_NAME>",
    .permissions = &.{
        .{.name = "ACCESS_NETWORK_STATE"}, 
        .{.name = "INTERNET"},
    },
    .appProperties = .{ .hasCode = false },
    .activities =  &.{
        .{
            .properties = .{
                // .alwaysRetainTaskState = true,
                .launchMode = .singleInstance,
                .name = "android.app.NativeActivity",
                .configChanges = &.{.layoutDirection, .locale, .orientation, .uiMode, .screenLayout, .screenSize, .smallestScreenSize, .keyboard, .keyboardHidden, .navigation}
            },
        }
    },
    .customAppProperties = &.{
        .{
            .name = "tools:targetApi",
            .value = b.fmt("{d}", .{<APPROPRIATE_API_LEVEL>})
        }
    },
    .glEsVersion = "0x00020000"
});
try manifest.addToApk(b, apk);
// ...
// install apk, etc..
// ...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages