mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-29 12:06:01 +02:00
feat: Add geolocation and haptics plugins (#1599)
* init geolocation plugin * ios impl (w/o js api) * generate ts api * use newer tauri commit * add temporary postinstall * include src in files * guest-js * just ship dist-js for now * fix watcher * fix android compile error * fix android build for real * fix heading type * initial getCurrentPosition android impl (wip) * prevent panics if errors (strings) are sent over the channel * Add android watchPosition implementation * init haptics plugin (android) * ios and new apis (ANDROID IS LIKELY BROKEN - MAY NOT EVEN COMPILE) * use tauri-specta that accounts for raw fn arg idents * add complete android support (it's not working great due to random soft-/hardware support) * fix(haptics): Fix the NotificationFeedbackType::Success and Version (#1) * Fix success feedback and version * Apply suggestions from code review * Update package.json --------- Co-authored-by: Fabian-Lars <118197967+FabianLars-crabnebula@users.noreply.github.com> * android: improve permission callback handling * keep track of ongoing perms requests * rebuild * license headers * rm sqlite feat * fmt * what diff u talkin bout? * ignore dist-js again * fix audits * dedupe api.js * clippy * changefiles * readmes * clean up todos * rm dsstore * rm wrong feats * mirror * covector * rebuild * ios requires the wry feature * lint * update lock --------- Co-authored-by: fabianlars <fabianlars@fabianlars.de> Co-authored-by: Brendan Allan <brendonovich@outlook.com> Co-authored-by: Naman Garg <155433377+naman-crabnebula@users.noreply.github.com> Co-authored-by: Lucas Nogueira <lucas@crabnebula.dev>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package app.tauri.haptics.patterns
|
||||
|
||||
val ImpactPatternLight = Pattern(
|
||||
longArrayOf(0, 50),
|
||||
intArrayOf(0, 30),
|
||||
longArrayOf(0, 20)
|
||||
)
|
||||
|
||||
val ImpactPatternMedium = Pattern(
|
||||
longArrayOf(0, 43),
|
||||
intArrayOf(0, 50),
|
||||
longArrayOf(0, 43)
|
||||
)
|
||||
|
||||
val ImpactPatternHeavy = Pattern(
|
||||
longArrayOf(0, 60),
|
||||
intArrayOf(0, 70),
|
||||
longArrayOf(0, 61)
|
||||
)
|
||||
|
||||
val ImpactPatternSoft = Pattern(
|
||||
longArrayOf(0, 50),
|
||||
intArrayOf(0, 30),
|
||||
longArrayOf(0, 20)
|
||||
)
|
||||
|
||||
val ImpactPatternRigid = Pattern(
|
||||
longArrayOf(0, 43),
|
||||
intArrayOf(0, 50),
|
||||
longArrayOf(0, 43)
|
||||
)
|
||||
@@ -0,0 +1,23 @@
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package app.tauri.haptics.patterns
|
||||
|
||||
val NotificationPatternSuccess = Pattern(
|
||||
longArrayOf(0, 40, 100, 40),
|
||||
intArrayOf(0, 50, 0, 60),
|
||||
longArrayOf(0, 40, 100, 40)
|
||||
)
|
||||
|
||||
val NotificationPatternWarning = Pattern(
|
||||
longArrayOf(0, 40, 120, 60),
|
||||
intArrayOf(0, 40, 0, 60),
|
||||
longArrayOf(0, 40, 120, 60)
|
||||
)
|
||||
|
||||
val NotificationPatternError = Pattern(
|
||||
longArrayOf(0, 60, 100, 40, 80, 50),
|
||||
intArrayOf(0, 50, 0, 40, 0, 50),
|
||||
longArrayOf(0, 60, 100, 40, 80, 50)
|
||||
)
|
||||
@@ -0,0 +1,11 @@
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package app.tauri.haptics.patterns
|
||||
|
||||
class Pattern (
|
||||
val timings: LongArray,
|
||||
val amplitudes: IntArray,
|
||||
val oldSDKPattern: LongArray
|
||||
) {}
|
||||
@@ -0,0 +1,11 @@
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package app.tauri.haptics.patterns
|
||||
|
||||
val SelectionPattern = Pattern (
|
||||
timings = longArrayOf(0, 50),
|
||||
amplitudes = intArrayOf(0, 30),
|
||||
oldSDKPattern = longArrayOf(0, 70)
|
||||
)
|
||||
Reference in New Issue
Block a user