This repository has been archived by the owner on Feb 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release/v2.2: (64 commits) Updated readme Added release binaries Updated copyright Bump version Fixed addon category/action Updated addon spec Updated read min requirements Updated screenshots Added duplicate feature Added imeoption and hide keyboard functionality Tidied layout Added basic image description functionality Updated dependencies and build tools New icon Removed icon sketch file Send update broadcast on activity resume Set base activity Added app type meta data for GrowUpdater Added custom addon action for GrowUpdater (optional addon) Created alpha1 binaries ...
- Loading branch information
Showing
79 changed files
with
1,915 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Addons | ||
|
||
Grow tracker has a basic implementation for addons via the use of Broadcast Intents. | ||
|
||
## Meta data | ||
|
||
You should provide the following meta-data tags for your addon application | ||
|
||
|key|type|description| | ||
|---|---|---| | ||
|`me.anon.grow.ADDON_NAME`|String|Name of your application addon| | ||
|`me.anon.grow.ADDON_VERSION`|String|Version of your application addon| | ||
|
||
## Available broadcasts | ||
|
||
Currently the available broadcasts you can listen for include | ||
|
||
### `me.anon.grow.ACTION_SAVE_PLANTS` | ||
|
||
This broadcast action is called when the plant list json is saved, an image has been saved, or when an image has been deleted. | ||
|
||
Data is provided with the broadcast intent via the bundle | ||
|
||
|key|type|description| | ||
|---|---|---| | ||
|`me.anon.grow.PLANT_LIST`|String|Full json-encoded array of plants and its data.| | ||
|`me.anon.grow.ENCRYPTED`|Boolean|If this is true, `me.anon.grow.PLANT_LIST` will be encrypted and base64 encoded, images will be encrypted on disk| | ||
|`me.anon.grow.IMAGE_ADDED`|String|Path to image added| | ||
|`me.anon.grow.IMAGE_DELETED`|String|Path to deleted image| | ||
|
||
Example receiver: | ||
|
||
```xml | ||
<receiver android:name=".CloudSyncBroadcastReceiver" android:exported="true" android:enabled="true"> | ||
<intent-filter> | ||
<action android:name="me.anon.grow.ACTION_SAVE_PLANTS" /> | ||
</intent-filter> | ||
</receiver> | ||
``` | ||
|
||
`Note:` you must include the `android:exported="true"` and `android:enabled="true"` parameters. | ||
|
||
## Configuring your addon | ||
|
||
You can register an activity with the receiver for configuration purposes by using the `me.anon.grow.ADDON_CONFIGURATION` intent-filter category. | ||
|
||
`Note:` The `action` for the intent-filter must be the action of the intent-filter of the addon (e.g. `me.anon.grow.ACTION_SAVE_PLANTS`) | ||
|
||
```xml | ||
<activity android:name=".ConfigureActivity"> | ||
<intent-filter> | ||
<action android:name="me.anon.grow.ACTION_SAVE_PLANTS" /> | ||
<category android:name="me.anon.grow.ADDON_CONFIGURATION" /> | ||
</intent-filter> | ||
</activity> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.