Migrate docs to VitePress
This commit is contained in:
@@ -1 +0,0 @@
|
||||
label: Developer Guide
|
||||
@@ -1,2 +0,0 @@
|
||||
label: External APIs
|
||||
position: 2
|
||||
@@ -2,6 +2,5 @@
|
||||
|
||||
Kvaesitso integrates with a number of external APIs. Most of them require some sort of authentication, like an API key. These API keys are not part of the GitHub repository. If you want to build Kvaesitso from source with all features enabled, follow the steps in this chapter.
|
||||
|
||||
:::info
|
||||
Kvaesitso is still buildable even without these steps, but some features will be disabled in the resulting APK. If all you need is a debug build for testing purposes, you can probably skip this chapter.
|
||||
:::
|
||||
> [!INFO]
|
||||
> Kvaesitso is still buildable even without these steps, but some features will be disabled in the resulting APK. If all you need is a debug build for testing purposes, you can probably skip this chapter.
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# Microsoft Graph Services
|
||||
|
||||
Microsoft Graph Services are used for OneDrive search. To enable OneDrive integration in your builds, follow these steps:
|
||||
|
||||
1. Go to the [Microsoft Azure Portal](https://portal.azure.com)
|
||||
1. Create a new project.
|
||||
1. Search for App Registrations
|
||||
1. Add a new registration
|
||||
1. Supported account types: Accounts in any organizational directory and personal Microsoft accounts
|
||||
1. Add an authentication platform
|
||||
1. Go to Authentication
|
||||
1. Add a platform > Android
|
||||
1. Enter the debug package name (de.mm20.launcher2.debug) and the signature hash of your debug key
|
||||
1. You can use the following command to generate the signature hash:
|
||||
`keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64`
|
||||
1. Click Configure > Done
|
||||
1. In the newly created Android section, click on Add URI
|
||||
1. Add package name (de.mm20.launcher2.release) and signature hash of your release key
|
||||
1. Download the client details
|
||||
1. In the debug client row, click on View
|
||||
1. Copy the JSON below MSAL Configuration to `ms-services/src/debug/res/raw/msal_auth_config.json` (you'll need to create this file first)
|
||||
1. Repeat the previous step for the release config
|
||||
1. Add the required scopes
|
||||
1. Go to API permissions
|
||||
1. Add a permission
|
||||
1. Select Microsoft Graph > Delegated permissions
|
||||
1. Tick the following scopes:
|
||||
- Files.Read.All
|
||||
- User.Read
|
||||
1. Click Add permissions
|
||||
@@ -43,6 +43,8 @@ Bright Sky is an API that converts data published by the Deutscher Wetterdienst
|
||||
to work with JSON format. The API is free to use and requires no additional configuration, however
|
||||
it only provides weather data for locations in Germany.
|
||||
|
||||
---
|
||||
|
||||
[^1]:
|
||||
These weather providers do not provide any means of geocoding or location lookup. Instead, the
|
||||
Android Geocoder API is used to lookup locations (in fixed location mode) and location names (in
|
||||
|
||||
@@ -107,10 +107,9 @@ To your `appfilter.xml` file, add the following:
|
||||
`prefix` is the prefix of the icon drawables. You need to provide one drawable for each day of the
|
||||
month (`calendar_1`, `calendar_2`, etc. up to `calendar_31`).
|
||||
|
||||
:::note
|
||||
Single digit days must not be zero-padded (e.g. `calendar_1` is correct but `calendar_01` is not).
|
||||
Make sure that all 31 drawables are present, or the launcher will reject the icon.
|
||||
:::
|
||||
> [!NOTE]
|
||||
> Single digit days must not be zero-padded (e.g. `calendar_1` is correct but `calendar_01` is not).
|
||||
> Make sure that all 31 drawables are present, or the launcher will reject the icon.
|
||||
|
||||
#### Clock icons
|
||||
|
||||
@@ -136,9 +135,8 @@ The icon itself must be either a `LayerDrawable`, or an `AdaptiveIconDrawable` w
|
||||
a `LayerDrawable`
|
||||
as its foreground layer.
|
||||
|
||||
:::note
|
||||
Some launchers only support `AdaptiveIconDrawable`s, so you should prefer that if possible.
|
||||
:::
|
||||
> [!NOTE]
|
||||
> Some launchers only support `AdaptiveIconDrawable`s, so you should prefer that if possible.
|
||||
|
||||
The entry in the `appfilter.xml` file tells the launcher which layer
|
||||
corresponds to which clock hand. If your icon does not have all three clock hands, you can omit the
|
||||
@@ -188,41 +186,38 @@ must follow these rules:
|
||||
above, the hour hand is offset by 300°, the minute hand by 60° and the second hand by 180°. This
|
||||
means that the clock shows 10:10:30 in its default state.
|
||||
- To let the launcher know which time the clock shows in its default state, you can use
|
||||
the `defaultHour`, `defaultMinute` and `defaultSecond` attributes in the `appfilter.xml` entry.
|
||||
the `defaultHour`, `defaultMinute` and `defaultSecond` attributes in the `appfilter.xml` entry.
|
||||
|
||||
:::note
|
||||
> [!NOTE]
|
||||
>
|
||||
> `defaultHour`, `defaultMinute` and `defaultSecond` are independent from each other. If you
|
||||
> set `defaultHour` to 10, then it is expected that the hour hand drawable is rotated by exactly 300°,
|
||||
> regardless of the positions of the minute and second hands even if that means that the clock shows
|
||||
> an impossible time.
|
||||
|
||||
`defaultHour`, `defaultMinute` and `defaultSecond` are independent from each other. If you
|
||||
set `defaultHour` to 10, then it is expected that the hour hand drawable is rotated by exactly 300°,
|
||||
regardless of the positions of the minute and second hands even if that means that the clock shows
|
||||
an impossible time.
|
||||
:::
|
||||
|
||||
:::info
|
||||
|
||||
**Why these numbers?**
|
||||
|
||||
Launchers use the `android:level` attribute to
|
||||
animate the clock hands. A drawable's level is a number
|
||||
between 0 and 10000 that influences how the drawable is drawn. For `RotateDrawable`s, the level
|
||||
attribute is used to set the rotation angle. Each level corresponds
|
||||
to 1/10000 of the angle between `android:fromDegrees` and `android:toDegrees`.
|
||||
|
||||
For the second hand, it is expected
|
||||
that [10 levels are equal to 1 second](https://cs.android.com/android/platform/superproject/+/refs/heads/master:frameworks/libs/systemui/iconloaderlib/src/com/android/launcher3/icons/ClockDrawableWrapper.java;drc=7346c436e5a11ce08f6a80dcfeb8ef941ca30176;l=84).
|
||||
which means that 600 levels correspond to a full rotation. But since a drawable has 10000 levels,
|
||||
the total angle must be `360/600 * 10000 = 6000` degrees.
|
||||
|
||||
For the minute layer, one level is equal to one minute so 60 levels are equal to a full rotation.
|
||||
This means that the total angle must be `360/60 * 10000 = 60000` degrees.
|
||||
|
||||
For the hour layer, one level is also equal to one minute, so there are `12 * 60 = 720` levels in a
|
||||
full rotation. `360/720 * 10000 = 5000` degrees.
|
||||
|
||||
Technically, you could also use other kinds of drawables that support the `android:level`
|
||||
attribute (such as a `LevelListDrawable`), as long as you follow the rules above.
|
||||
|
||||
:::
|
||||
> [!INFO]
|
||||
>
|
||||
> **Why these numbers?**
|
||||
>
|
||||
> Launchers use the `android:level` attribute to
|
||||
> animate the clock hands. A drawable's level is a number
|
||||
> between 0 and 10000 that influences how the drawable is drawn. For `RotateDrawable`s, the level
|
||||
> attribute is used to set the rotation angle. Each level corresponds
|
||||
> to 1/10000 of the angle between `android:fromDegrees` and `android:toDegrees`.
|
||||
>
|
||||
> For the second hand, it is expected
|
||||
> that [10 levels are equal to 1 second](https://cs.android.com/android/platform/superproject/+/refs/heads/master:frameworks/libs/systemui/iconloaderlib/src/com/android/launcher3/icons/ClockDrawableWrapper.java;drc=7346c436e5a11ce08f6a80dcfeb8ef941ca30176;l=84).
|
||||
> which means that 600 levels correspond to a full rotation. But since a drawable has 10000 levels,
|
||||
> the total angle must be `360/600 * 10000 = 6000` degrees.
|
||||
>
|
||||
> For the minute layer, one level is equal to one minute so 60 levels are equal to a full rotation.
|
||||
> This means that the total angle must be `360/60 * 10000 = 60000` degrees.
|
||||
>
|
||||
> For the hour layer, one level is also equal to one minute, so there are `12 * 60 = 720` levels in a
|
||||
> full rotation. `360/720 * 10000 = 5000` degrees.
|
||||
>
|
||||
> Technically, you could also use other kinds of drawables that support the `android:level`
|
||||
> attribute (such as a `LevelListDrawable`), as long as you follow the rules above.
|
||||
|
||||
### Themed icons
|
||||
|
||||
|
||||
+3
-2
@@ -1,5 +1,6 @@
|
||||
label: Integrations
|
||||
label: Plugins
|
||||
position: 4
|
||||
link:
|
||||
type: generated-index
|
||||
title: Integrations
|
||||
title: Plugins
|
||||
description: In this chapter you will learn how external apps can integrate with Kvaesitso.
|
||||
@@ -0,0 +1,5 @@
|
||||
# Get Started
|
||||
|
||||
First, create a new project in Android Studio.
|
||||
|
||||
## Get the plugin SDK
|
||||
@@ -0,0 +1 @@
|
||||
# File Search
|
||||
@@ -0,0 +1 @@
|
||||
# Search provider
|
||||
@@ -0,0 +1,56 @@
|
||||
import type { DefaultTheme } from 'vitepress/types/default-theme'
|
||||
|
||||
export const DeveloperGuideSidebar: DefaultTheme.SidebarItem[] = [
|
||||
{
|
||||
text: 'Developer Guide',
|
||||
link: '/docs/developer-guide/',
|
||||
},
|
||||
{
|
||||
text: 'Setup',
|
||||
link: '/docs/developer-guide/setup',
|
||||
},
|
||||
{
|
||||
text: 'External APIs',
|
||||
link: '/docs/developer-guide/external-apis/',
|
||||
items: [
|
||||
{
|
||||
text: 'Currency Exchange Rates',
|
||||
link: '/docs/developer-guide/external-apis/exchange-rates',
|
||||
},
|
||||
{
|
||||
text: 'Google Cloud Services',
|
||||
link: '/docs/developer-guide/external-apis/google',
|
||||
},
|
||||
{
|
||||
text: 'Weather Services',
|
||||
link: '/docs/developer-guide/external-apis/weather',
|
||||
},
|
||||
{
|
||||
text: 'Wikipedia',
|
||||
link: '/docs/developer-guide/external-apis/wikipedia',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Project Structure',
|
||||
items: [
|
||||
{
|
||||
text: 'Modules',
|
||||
link: '/docs/developer-guide/project-structure/modules',
|
||||
},
|
||||
{
|
||||
text: 'Libraries',
|
||||
link: '/docs/developer-guide/project-structure/libraries',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Integrations',
|
||||
items: [
|
||||
{
|
||||
text: 'Icon Packs',
|
||||
link: '/docs/developer-guide/integrations/icon-packs',
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
Reference in New Issue
Block a user