0.0.8 • Published 2 years ago

link-navigation-plugin v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Link Navigation Plugin for Capacitor

This link navigation plugin for Capacitor creates a simple system alert window (overlay) that draws over other apps and allows user to navigate through the array of links passed into the plugin.

Only works on Android as system alert window functionality is not supported on iOS.

Additional features

Install

npm install link-navigation-plugin
npx cap sync

Usage

Add colorDark and colorLight resources at android/app/src/main/res/values/strings.xml to customise the popup style.

<resources>
    <color name="colorDark">#000000</color>
    <color name="colorLight">#ffffff</color>
</resources>

Then trigger the popup from your code:

import { Overlay } from 'link-navigation-plugin';

Overlay.open({ 
    values: [
        { name: "Google", url: "https://google.com" },
        { name: "Yahoo", url: "https://yahoo.com" },
    ]},
    package: "com.example.app" // your package name for plugin to redirect back to
)

API

open(...)

open(options: { values: Link[]; package: string; }) => Promise<{ value: string; }>
ParamType
options{ values: Link[]; package: string; }

Returns: Promise<{ value: string; }>


close()

close() => Promise<{ lat?: number; lng?: number; }>

Returns: Promise<{ lat?: number; lng?: number; }>


state()

state() => Promise<{ isActive: boolean; }>

Returns: Promise<{ isActive: boolean; }>


Interfaces

Link

PropType
urlstring
namestring
querystring | null
longitudenumber | null
latitudenumber | null
displacementnumber | null
0.0.8

2 years ago

0.0.5

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.3

2 years ago

0.0.4

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago