-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add chuck plugin Add device info plugin Add app info plugin
- Loading branch information
Showing
8 changed files
with
86 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
<manifest package="pl.droidsonroids.foqa"/> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="pl.droidsonroids.foqa"> | ||
|
||
<application> | ||
<provider | ||
android:initOrder="-2147483648" | ||
android:name="pl.droidsonroids.foqa.InitProvider" | ||
android:authorities="pl.droidsonroids.foqa.init" | ||
android:exported="false" /> | ||
</application> | ||
</manifest> |
20 changes: 20 additions & 0 deletions
20
library/src/main/java/pl/droidsonroids/foqa/DeviceInfoPlugin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package pl.droidsonroids.foqa; | ||
|
||
import android.os.Build; | ||
|
||
import com.github.takahirom.hyperion.plugin.simpleitem.SimpleItem; | ||
import com.github.takahirom.hyperion.plugin.simpleitem.SimpleItemHyperionPlugin; | ||
import com.jaredrummler.android.device.DeviceName; | ||
|
||
final class DeviceInfoPlugin { | ||
|
||
static void initialize() { | ||
String manufacturer = Build.MANUFACTURER; | ||
String deviceModel = DeviceName.getDeviceName(); | ||
String sdk = Build.VERSION.RELEASE; | ||
SimpleItem item = new SimpleItem.Builder() | ||
.text(manufacturer + ' ' + deviceModel + " Android: " + sdk) | ||
.build(); | ||
SimpleItemHyperionPlugin.addItem(item); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
library/src/main/java/pl/droidsonroids/foqa/InitProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package pl.droidsonroids.foqa; | ||
|
||
import android.content.ContentProvider; | ||
import android.content.ContentValues; | ||
import android.database.Cursor; | ||
import android.net.Uri; | ||
|
||
public class InitProvider extends ContentProvider { | ||
|
||
@Override | ||
public boolean onCreate() { | ||
DeviceInfoPlugin.initialize(); | ||
return true; | ||
} | ||
|
||
@Override | ||
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String getType(Uri uri) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Uri insert(Uri uri, ContentValues values) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public int delete(Uri uri, String selection, String[] selectionArgs) { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { | ||
return 0; | ||
} | ||
} |