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..
// ...