Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad5d790754 | ||
|
|
04fbfde9c2 | ||
|
|
052afb3a7b | ||
|
|
0a0e806d01 |
11
.github/workflows/build.yml
vendored
11
.github/workflows/build.yml
vendored
@@ -2,9 +2,9 @@ name: Build
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "dev" ]
|
branches: [ "master" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "dev" ]
|
branches: [ "master" ]
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -45,20 +45,19 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
targetPlatform: Android
|
targetPlatform: Android
|
||||||
allowDirtyBuild: true
|
allowDirtyBuild: true
|
||||||
buildName: "HooverHighQuestAppLauncher-DEV"
|
|
||||||
|
|
||||||
# Output
|
# Output
|
||||||
- name: Upload build
|
- name: Upload build
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
files: build/Android/*.apk
|
files: build/
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
tag_name: "1.0.0-dev"
|
tag_name: "1.0.0"
|
||||||
|
|
||||||
# Upload dir
|
# Upload dir
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Build-dev
|
name: Build
|
||||||
path: build
|
path: build
|
||||||
|
|
||||||
# Return License
|
# Return License
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
|
||||||
<uses-feature android:name="android.hardware.vr.headtracking" android:required="false" android:version="1" />
|
<uses-feature android:name="android.hardware.vr.headtracking" android:required="false" android:version="1" />
|
||||||
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
|
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -20857,7 +20857,7 @@ GameObject:
|
|||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &2124784240
|
--- !u!224 &2124784240
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -20934,7 +20934,7 @@ MonoBehaviour:
|
|||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls:
|
m_Calls:
|
||||||
- m_Target: {fileID: 883330328}
|
- m_Target: {fileID: 883330328}
|
||||||
m_MethodName: ""
|
m_MethodName: OpenSettings
|
||||||
m_Mode: 1
|
m_Mode: 1
|
||||||
m_Arguments:
|
m_Arguments:
|
||||||
m_ObjectArgument: {fileID: 0}
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
@@ -14,55 +14,6 @@ using Newtonsoft.Json.Linq;
|
|||||||
|
|
||||||
namespace QuestAppLauncher
|
namespace QuestAppLauncher
|
||||||
{
|
{
|
||||||
public class InstallAPK
|
|
||||||
{
|
|
||||||
private bool installApp(string apkPath)
|
|
||||||
{
|
|
||||||
bool success = true;
|
|
||||||
//GameObject.Find("TextDebug").GetComponent<Text>().text = "Installing App";
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
//Get Activity then Context
|
|
||||||
AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
|
|
||||||
AndroidJavaObject currentActivity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
|
|
||||||
AndroidJavaObject unityContext = currentActivity.Call<AndroidJavaObject>("getApplicationContext");
|
|
||||||
|
|
||||||
//Get the package Name
|
|
||||||
string packageName = unityContext.Call<string>("getPackageName");
|
|
||||||
string authority = packageName + ".fileprovider";
|
|
||||||
|
|
||||||
AndroidJavaClass intentObj = new AndroidJavaClass("android.content.Intent");
|
|
||||||
string ACTION_VIEW = intentObj.GetStatic<string>("ACTION_VIEW");
|
|
||||||
AndroidJavaObject intent = new AndroidJavaObject("android.content.Intent", ACTION_VIEW);
|
|
||||||
|
|
||||||
|
|
||||||
int FLAG_ACTIVITY_NEW_TASK = intentObj.GetStatic<int>("FLAG_ACTIVITY_NEW_TASK");
|
|
||||||
int FLAG_GRANT_READ_URI_PERMISSION = intentObj.GetStatic<int>("FLAG_GRANT_READ_URI_PERMISSION");
|
|
||||||
|
|
||||||
//File fileObj = new File(String pathname);
|
|
||||||
AndroidJavaObject fileObj = new AndroidJavaObject("java.io.File", apkPath);
|
|
||||||
//FileProvider object that will be used to call it static function
|
|
||||||
AndroidJavaClass fileProvider = new AndroidJavaClass("android.support.v4.content.FileProvider");
|
|
||||||
//getUriForFile(Context context, String authority, File file)
|
|
||||||
AndroidJavaObject uri = fileProvider.CallStatic<AndroidJavaObject>("getUriForFile", unityContext, authority, fileObj);
|
|
||||||
|
|
||||||
intent.Call<AndroidJavaObject>("setDataAndType", uri, "application/vnd.android.package-archive");
|
|
||||||
intent.Call<AndroidJavaObject>("addFlags", FLAG_ACTIVITY_NEW_TASK);
|
|
||||||
intent.Call<AndroidJavaObject>("addFlags", FLAG_GRANT_READ_URI_PERMISSION);
|
|
||||||
currentActivity.Call("startActivity", intent);
|
|
||||||
|
|
||||||
//GameObject.Find("TextDebug").GetComponent<Text>().text = "Success";
|
|
||||||
}
|
|
||||||
catch (System.Exception e)
|
|
||||||
{
|
|
||||||
//GameObject.Find("TextDebug").GetComponent<Text>().text = "Error: " + e.Message;
|
|
||||||
success = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return success;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Downloads assets (app icons packs and names files) from configured repos.
|
/// Downloads assets (app icons packs and names files) from configured repos.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -78,12 +29,7 @@ namespace QuestAppLauncher
|
|||||||
const string TempDownloadFileExtention = ".tmp_download";
|
const string TempDownloadFileExtention = ".tmp_download";
|
||||||
|
|
||||||
// GitHub API url
|
// GitHub API url
|
||||||
const string GithubApiUrl = @"http://api.github.com/";
|
const string GithubApiUrl = @"http://api.github.com/repos/";
|
||||||
|
|
||||||
// If Github account is a org set this to true
|
|
||||||
public bool isorg = true;
|
|
||||||
|
|
||||||
public string GithubUrl = "";
|
|
||||||
|
|
||||||
// Rate limit in minutes
|
// Rate limit in minutes
|
||||||
const int RateLimitInMins = 5;
|
const int RateLimitInMins = 5;
|
||||||
@@ -241,9 +187,9 @@ namespace QuestAppLauncher
|
|||||||
var configRepos = new HashSet<string>();
|
var configRepos = new HashSet<string>();
|
||||||
foreach (var item in config.downloadRepos)
|
foreach (var item in config.downloadRepos)
|
||||||
{
|
{
|
||||||
if (null == item.type || !string.Equals(item.type, Config.DownloadRepo_Type_GitHub, StringComparison.OrdinalIgnoreCase) || !string.Equals(item.type, Config.DownloadRepo_Type_PrivUrl, StringComparison.OrdinalIgnoreCase))
|
if (null == item.type || !string.Equals(item.type, Config.DownloadRepo_Type_GitHub, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
// For now, we only support GitHub repos, or our private update url
|
// For now, we only support GitHub repos
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -348,12 +294,7 @@ namespace QuestAppLauncher
|
|||||||
private async Task<bool> GetAssetsInfoFromGithubRepoAsync(string repoUri,
|
private async Task<bool> GetAssetsInfoFromGithubRepoAsync(string repoUri,
|
||||||
Dictionary<string, AssetInfo> assetsInfo, IDownloadProgress downloadProgress = null)
|
Dictionary<string, AssetInfo> assetsInfo, IDownloadProgress downloadProgress = null)
|
||||||
{
|
{
|
||||||
if (isorg == true) {
|
var requestUrl = GithubApiUrl + repoUri;
|
||||||
GithubUrl = GithubApiUrl + "orgs/";
|
|
||||||
} else {
|
|
||||||
GithubUrl = GithubApiUrl;
|
|
||||||
}
|
|
||||||
var requestUrl = GithubUrl + repoUri;
|
|
||||||
Debug.LogFormat("Reading assets from {0}", requestUrl);
|
Debug.LogFormat("Reading assets from {0}", requestUrl);
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
@@ -26,11 +26,10 @@ namespace QuestAppLauncher
|
|||||||
|
|
||||||
// Download repos
|
// Download repos
|
||||||
public const string DownloadRepo_Type_GitHub = "github";
|
public const string DownloadRepo_Type_GitHub = "github";
|
||||||
public const string DownloadRepo_Type_PrivUrl = "hhsupserver";
|
|
||||||
public const string DownloadRepo_Default = @"hooverhigh/QuestAppLauncher_Assets/releases/latest";
|
public const string DownloadRepo_Default = @"hooverhigh/QuestAppLauncher_Assets/releases/latest";
|
||||||
|
|
||||||
// Background
|
// Background
|
||||||
public const string Background_Default = "background.jpg";
|
public const string Background_Default = "default";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Grid size
|
/// Grid size
|
||||||
@@ -38,8 +37,8 @@ namespace QuestAppLauncher
|
|||||||
[Serializable]
|
[Serializable]
|
||||||
public class GridSize
|
public class GridSize
|
||||||
{
|
{
|
||||||
public int rows = 4;
|
public int rows = 3;
|
||||||
public int cols = 4;
|
public int cols = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -62,7 +61,7 @@ namespace QuestAppLauncher
|
|||||||
public bool show2D = true;
|
public bool show2D = true;
|
||||||
|
|
||||||
// Auto Category: Apps are automatically categorized into 3 tabs - Quest, Go/GearVr, 2D
|
// Auto Category: Apps are automatically categorized into 3 tabs - Quest, Go/GearVr, 2D
|
||||||
public string autoCategory = Category_Off;
|
public string autoCategory = Category_Top;
|
||||||
|
|
||||||
// Custom Category: Apps are categorized according to appnames.txt file
|
// Custom Category: Apps are categorized according to appnames.txt file
|
||||||
public string customCategory = Category_Right;
|
public string customCategory = Category_Right;
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 70 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 73 KiB |
@@ -12,8 +12,8 @@ PlayerSettings:
|
|||||||
targetDevice: 2
|
targetDevice: 2
|
||||||
useOnDemandResources: 0
|
useOnDemandResources: 0
|
||||||
accelerometerFrequency: 60
|
accelerometerFrequency: 60
|
||||||
companyName: hooverhigh
|
companyName: AAA
|
||||||
productName: Quest App Launcher
|
productName: .Quest App Launcher
|
||||||
defaultCursor: {fileID: 0}
|
defaultCursor: {fileID: 0}
|
||||||
cursorHotspot: {x: 0, y: 0}
|
cursorHotspot: {x: 0, y: 0}
|
||||||
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
|
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
|
||||||
@@ -165,8 +165,8 @@ PlayerSettings:
|
|||||||
androidSupportedAspectRatio: 1
|
androidSupportedAspectRatio: 1
|
||||||
androidMaxAspectRatio: 2.1
|
androidMaxAspectRatio: 2.1
|
||||||
applicationIdentifier:
|
applicationIdentifier:
|
||||||
Android: HooverHigh.QuestAppLauncher
|
Android: aaa.QuestAppLauncher.App
|
||||||
Standalone: com.HooverHigh.QuestAppLauncher
|
Standalone: com.DefaultCompany.QuestAppLauncher
|
||||||
buildNumber: {}
|
buildNumber: {}
|
||||||
AndroidBundleVersionCode: 1
|
AndroidBundleVersionCode: 1
|
||||||
AndroidMinSdkVersion: 25
|
AndroidMinSdkVersion: 25
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Quest App Launcher
|
# Quest App Launcher
|
||||||
|
|
||||||
[](https://github.com/HooverHigh/QuestAppLauncher/actions/workflows/build.yml)
|
[](https://github.com/HooverHigh/QuestAppLauncher/actions/workflows/build.yml)
|
||||||
|
|
||||||
An app launcher for hoover high Oculus Quests, implemented in Unity.
|
An app launcher for hoover high Oculus Quests, implemented in Unity.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user