https://github.com/zunjae/zapp
Collection of Android package specific app utils
https://github.com/zunjae/zapp
Last synced: 11 months ago
JSON representation
Collection of Android package specific app utils
- Host: GitHub
- URL: https://github.com/zunjae/zapp
- Owner: zunjae
- Created: 2017-07-24T14:47:26.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-09-17T07:31:41.000Z (over 6 years ago)
- Last Synced: 2025-06-28T04:06:59.717Z (11 months ago)
- Language: Java
- Size: 136 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ZApp
Collection of App Utils
Add it in your root build.gradle at the end of repositories:
```java
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
```
Add the dependency:
```java
dependencies {
compile 'com.github.zunjae:Zapp:0.6'
}
```
Usage:
```java
boolean hasAppInstalled = AppUtil.hasAppInstalled(this, "com.zunjae.anyme"); // true | false
boolean hasAnyAppInstalled = AppUtil.hasAnyAppInstalled(this, "first.package", "second.package"); // true | false
String packageName = AppUtil.getAnyAppInstalled(this, "coolapp.pro", "coolapp.ad"); // "coolapp.pro" | "coolapp.ad" | null
boolean intentIsValid = AppUtil.intentIsValid(this, yourIntentHere); // true | false
boolean deviceIsEmulator = AppUtil.deviceIsEmulator(); // true | false
double versionNumberDouble = AppUtil.versionNumberDouble(); // 1.0 | 2.0 | -1.0
int versionNumberInt = AppUtil.versionNumberInt(); // 1 | 2 | -1
String versionNumberString = AppUtil.versionNumberString(); // "1" | "2" | null
```
Check https://github.com/zunjae/ZApp/blob/master/zapplib/src/androidTest/java/com/zunjae/zapplib/MainInstrumentationTest.java for example usage
## License
This project is available under the MIT license, though there is no need to include a license and copyright notice