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:
|
||||
push:
|
||||
branches: [ "dev" ]
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "dev" ]
|
||||
branches: [ "master" ]
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
@@ -45,20 +45,19 @@ jobs:
|
||||
with:
|
||||
targetPlatform: Android
|
||||
allowDirtyBuild: true
|
||||
buildName: "HooverHighQuestAppLauncher-DEV"
|
||||
|
||||
# Output
|
||||
- name: Upload build
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: build/Android/*.apk
|
||||
files: build/
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag_name: "1.0.0-dev"
|
||||
tag_name: "1.0.0"
|
||||
|
||||
# Upload dir
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Build-dev
|
||||
name: Build
|
||||
path: build
|
||||
|
||||
# Return License
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</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-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
|
||||
</manifest>
|
||||
</manifest>
|
||||
@@ -20857,7 +20857,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2124784240
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -20934,7 +20934,7 @@ MonoBehaviour:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 883330328}
|
||||
m_MethodName: ""
|
||||
m_MethodName: OpenSettings
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@@ -14,55 +14,6 @@ using Newtonsoft.Json.Linq;
|
||||
|
||||
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>
|
||||
/// Downloads assets (app icons packs and names files) from configured repos.
|
||||
/// </summary>
|
||||
@@ -78,12 +29,7 @@ namespace QuestAppLauncher
|
||||
const string TempDownloadFileExtention = ".tmp_download";
|
||||
|
||||
// GitHub API url
|
||||
const string GithubApiUrl = @"http://api.github.com/";
|
||||
|
||||
// If Github account is a org set this to true
|
||||
public bool isorg = true;
|
||||
|
||||
public string GithubUrl = "";
|
||||
const string GithubApiUrl = @"http://api.github.com/repos/";
|
||||
|
||||
// Rate limit in minutes
|
||||
const int RateLimitInMins = 5;
|
||||
@@ -241,9 +187,9 @@ namespace QuestAppLauncher
|
||||
var configRepos = new HashSet<string>();
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -348,12 +294,7 @@ namespace QuestAppLauncher
|
||||
private async Task<bool> GetAssetsInfoFromGithubRepoAsync(string repoUri,
|
||||
Dictionary<string, AssetInfo> assetsInfo, IDownloadProgress downloadProgress = null)
|
||||
{
|
||||
if (isorg == true) {
|
||||
GithubUrl = GithubApiUrl + "orgs/";
|
||||
} else {
|
||||
GithubUrl = GithubApiUrl;
|
||||
}
|
||||
var requestUrl = GithubUrl + repoUri;
|
||||
var requestUrl = GithubApiUrl + repoUri;
|
||||
Debug.LogFormat("Reading assets from {0}", requestUrl);
|
||||
|
||||
try
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@@ -26,11 +26,10 @@ namespace QuestAppLauncher
|
||||
|
||||
// Download repos
|
||||
public const string DownloadRepo_Type_GitHub = "github";
|
||||
public const string DownloadRepo_Type_PrivUrl = "hhsupserver";
|
||||
public const string DownloadRepo_Default = @"hooverhigh/QuestAppLauncher_Assets/releases/latest";
|
||||
|
||||
// Background
|
||||
public const string Background_Default = "background.jpg";
|
||||
public const string Background_Default = "default";
|
||||
|
||||
/// <summary>
|
||||
/// Grid size
|
||||
@@ -38,8 +37,8 @@ namespace QuestAppLauncher
|
||||
[Serializable]
|
||||
public class GridSize
|
||||
{
|
||||
public int rows = 4;
|
||||
public int cols = 4;
|
||||
public int rows = 3;
|
||||
public int cols = 3;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -62,7 +61,7 @@ namespace QuestAppLauncher
|
||||
public bool show2D = true;
|
||||
|
||||
// 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
|
||||
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
|
||||
useOnDemandResources: 0
|
||||
accelerometerFrequency: 60
|
||||
companyName: hooverhigh
|
||||
productName: Quest App Launcher
|
||||
companyName: AAA
|
||||
productName: .Quest App Launcher
|
||||
defaultCursor: {fileID: 0}
|
||||
cursorHotspot: {x: 0, y: 0}
|
||||
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
|
||||
@@ -165,8 +165,8 @@ PlayerSettings:
|
||||
androidSupportedAspectRatio: 1
|
||||
androidMaxAspectRatio: 2.1
|
||||
applicationIdentifier:
|
||||
Android: HooverHigh.QuestAppLauncher
|
||||
Standalone: com.HooverHigh.QuestAppLauncher
|
||||
Android: aaa.QuestAppLauncher.App
|
||||
Standalone: com.DefaultCompany.QuestAppLauncher
|
||||
buildNumber: {}
|
||||
AndroidBundleVersionCode: 1
|
||||
AndroidMinSdkVersion: 25
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user