Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
|
2f7a83e9da | |
|
53c606ff2c | |
|
3d1bbd054c | |
|
d532a8d6bb | |
|
3001d8e107 |
164
README.md
164
README.md
|
@ -7,22 +7,24 @@ Android SDK
|
||||||
- [Settings](#settings)
|
- [Settings](#settings)
|
||||||
- [App](#app)
|
- [App](#app)
|
||||||
- [Add fragment](#fragment)
|
- [Add fragment](#fragment)
|
||||||
|
- [Keyboard support](#keyboard)
|
||||||
- [Troubleshooting](#troubleshooting)
|
- [Troubleshooting](#troubleshooting)
|
||||||
- [Authors](#authors)
|
- [Authors](#authors)
|
||||||
|
|
||||||
<a name="import"></a>
|
<a name="import"></a>
|
||||||
## Import
|
## Import
|
||||||
You must use git to download the sdk from [repository](https://github.com/tecnaviapress/newsmemory-android-sdk)
|
|
||||||
1. The repository is private, to clone it you must generate an ssh key, see the [guide](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)
|
You must use git to download the sdk from [repository](https://pubgit.newsmemory.com/tecnavia/newsmemory-android-sdk)
|
||||||
2. Once the key is generate you must send to Tecnavia the public key and wait a confirmation that you are enabled
|
|
||||||
3. Inside root folder run the following command, replace TAG with the latest release, see the list on [releases](https://github.com/tecnaviapress/newsmemory-android-sdk/releases)
|
1. Inside root folder run the following command:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone --depth 1 --brach TAG git@github.com:tecnaviapress/newsmemory-android-sdk.git
|
git clone --depth 1 --branch 3.18.19 https://pubgit.newsmemory.com/tecnavia/newsmemory-android-sdk.git
|
||||||
```
|
```
|
||||||
4. if you already has the module you could update to another release by the following commands
|
2. if you already has the module you could update to another release by the following commands
|
||||||
```sh
|
```sh
|
||||||
cd newsmemory-android-sdk
|
cd newsmemory-android-sdk
|
||||||
git checkout tags/TAG
|
git checkout tags/3.18.19
|
||||||
```
|
```
|
||||||
<a name="installation"></a>
|
<a name="installation"></a>
|
||||||
## Installation
|
## Installation
|
||||||
|
@ -238,6 +240,9 @@ public class YourActivity extends AppCompatActivity {
|
||||||
//set the SDK referrer for GA4 analytics
|
//set the SDK referrer for GA4 analytics
|
||||||
bundle.putString(TaConstants.TA_REFERRER, "referrer");
|
bundle.putString(TaConstants.TA_REFERRER, "referrer");
|
||||||
|
|
||||||
|
//querystring-like list of parameters to pass to GA4 analytics
|
||||||
|
bundle.putString(TaConstants.TA_EXTRA_GA4_PARAMS, "param1=value1¶m2=value2¶m3=value3");
|
||||||
|
|
||||||
return bundle;
|
return bundle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -259,7 +264,7 @@ the following constants are required by SDK otherwise there will be some inconsi
|
||||||
|
|
||||||
the following constant can be used for debug builds ONLY, to monitor the load time performances
|
the following constant can be used for debug builds ONLY, to monitor the load time performances
|
||||||
```java
|
```java
|
||||||
bundle.putBoolean(TaConstants.TA_ENABLE_DEBUGGER_KEY, true);
|
bundle.putBoolean(TaConstants.TA_ENABLE_DEBUGGER, true);
|
||||||
```
|
```
|
||||||
|
|
||||||
1. The activity that load TaFragment must implement the following interface *DefaultHardwareBackBtnHandler*
|
1. The activity that load TaFragment must implement the following interface *DefaultHardwareBackBtnHandler*
|
||||||
|
@ -280,6 +285,145 @@ public class YourActivity extends TaActivity {
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
---
|
||||||
|
|
||||||
|
<a name="keyboard"></a>
|
||||||
|
|
||||||
|
## Keyboard support
|
||||||
|
|
||||||
|
On devices which support a physical or a virtual keyboard the SDK supports some shortcuts to navigate and interact with the ePaper.
|
||||||
|
|
||||||
|
### Code integration
|
||||||
|
|
||||||
|
In your activity you have to override the following callbacks and call the corresponding method on the TaFragment.
|
||||||
|
|
||||||
|
```java
|
||||||
|
public class MainActivity extends AppCompatActivity implements DefaultHardwareBackBtnHandler {
|
||||||
|
private TaFragment taFragment;
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||||
|
taFragment.keyDown(keyCode, event);
|
||||||
|
return super.onKeyDown(keyCode, event);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
||||||
|
taFragment.keyUp(keyCode, event);
|
||||||
|
return super.onKeyUp(keyCode, event);
|
||||||
|
}
|
||||||
|
|
||||||
|
...
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Here a list of the supported keys:
|
||||||
|
|
||||||
|
### Key groups
|
||||||
|
|
||||||
|
Some actions can be performed with more than one key, here the so-called `key groups`:
|
||||||
|
|
||||||
|
| Name | Keys |
|
||||||
|
| ---------- | --------------------------------------------------- |
|
||||||
|
| `LEFT` | `J`, `4`, `4` (NUMPAD), `LEFT ARROW` |
|
||||||
|
| `RIGHT` | `L`, `6`, `6` (NUMPAD), `RIGHT ARROW` |
|
||||||
|
| `UP` | `I`, `8`, `8` (NUMPAD), `UP ARROW` |
|
||||||
|
| `DOWN` | `K`, `2`, `2` (NUMPAD), `DOWN ARROW` |
|
||||||
|
| `PAGE_UP` | `N`, `9`, `9` (NUMPAD), `PAGE UP` |
|
||||||
|
| `PAGE_DOWN`| `M`, `3`, `3` (NUMPAD), `PAGE DOWN` |
|
||||||
|
| `OPEN` | `O`, `5`, `5` (NUMPAD), `.` (NUMPAD) |
|
||||||
|
| `SELECT` | `O`, `5`, `ENTER`, `5` (NUMPAD), `ENTER` (NUMPAD) |
|
||||||
|
| `SUBMIT` | `ENTER`, `ENTER` (NUMPAD) |
|
||||||
|
| `HOME` | `7`, `7` (NUMPAD), `HOME` |
|
||||||
|
| `END` | `1`, `1` (NUMPAD), `END` |
|
||||||
|
| `LESS` | `-`, `-` (NUMPAD) |
|
||||||
|
| `MORE` | `+`, `+` (NUMPAD) |
|
||||||
|
|
||||||
|
### Menu items
|
||||||
|
|
||||||
|
| Key(s) or Key Group | Behavior |
|
||||||
|
| --------------------------- | ---------------------------------------- |
|
||||||
|
| `ENTER` | Press menu item |
|
||||||
|
| `ESC` | Blur menu item |
|
||||||
|
| `I` | Open index mode |
|
||||||
|
| `LEFT`/`RIGHT` group, `TAB` | Navigate thru items |
|
||||||
|
| `P`, `.` (NUMPAD) | Open thumbnails mode |
|
||||||
|
| `Search` | Open search mode |
|
||||||
|
| `Space` | Toggle fit mode |
|
||||||
|
| `T` | Open accessibility mode |
|
||||||
|
|
||||||
|
### Graphic mode
|
||||||
|
|
||||||
|
| Key(s) or Key Group | Behavior |
|
||||||
|
| ------------------------------------------- | ---------------------------------------- |
|
||||||
|
| `B` | Open browse mode |
|
||||||
|
| `OPEN` group | Open first article |
|
||||||
|
| `LEFT`/`RIGHT`/`PAGE_UP`/`PAGE_DOWN` groups | Navigate thru page |
|
||||||
|
| `UP`/`DOWN` groups | Move vertically in the page |
|
||||||
|
| `MORE`/`LESS` groups | Zoom in/out in the page |
|
||||||
|
| `HOME` group | Move to previous section |
|
||||||
|
| `END` group | Move to next section |
|
||||||
|
|
||||||
|
### Index mode
|
||||||
|
|
||||||
|
| Key(s) or Key Group | Behavior |
|
||||||
|
| ------------------------------------------- | ---------------------------------------- |
|
||||||
|
| `CLOSE` group | Close index mode |
|
||||||
|
| `SPACE` group | Toggle index mode fullscreen mode |
|
||||||
|
|
||||||
|
### Index mode (2nd level)
|
||||||
|
|
||||||
|
| Key(s) or Key Group | Behavior |
|
||||||
|
| ------------------------------------------- | ---------------------------------------- |
|
||||||
|
| `CLOSE` group | Close index mode |
|
||||||
|
| `SPACE` group | Toggle index mode fullscreen mode |
|
||||||
|
| `LEFT`/`RIGHT` group | Navigate thru sections |
|
||||||
|
| `OPEN` group | Open 1st level index |
|
||||||
|
|
||||||
|
### Article mode
|
||||||
|
|
||||||
|
| Key(s) or Key Group | Behavior |
|
||||||
|
| ------------------------------------------- | ---------------------------------------------------- |
|
||||||
|
| `CLOSE` group | Close article mode (if search active, closes search) |
|
||||||
|
| `UP`/`DOWN` group | Scroll up/down the article |
|
||||||
|
| `LEFT`/`RIGHT` group | Navigate thru articles |
|
||||||
|
| `PAGE_UP`/`PAGE_DOWN` group | Go to the first article of previous/next page |
|
||||||
|
| `OPEN` group | Open 2nd level index |
|
||||||
|
| `MORE`/`LESS` groups | Zoom in/out in the article |
|
||||||
|
| `HOME` group | Move to previous article slug |
|
||||||
|
| `END` group | Move to next article slug |
|
||||||
|
| `SPACE` group | Toggle article mode fullscreen mode |
|
||||||
|
| `P` | Print |
|
||||||
|
| `S` | Share |
|
||||||
|
| `V` | Toggle text-to-speech |
|
||||||
|
| `SELECT` group | Select item (accessibility mode) |
|
||||||
|
|
||||||
|
### Thumbnail mode
|
||||||
|
|
||||||
|
| Key(s) or Key Group | Behavior |
|
||||||
|
| ------------------------------------------- | ---------------------------------------- |
|
||||||
|
| `LEFT`/`RIGHT` groups | Navigate thru thumbnails |
|
||||||
|
| `SELECT` group | Open highlighted page |
|
||||||
|
|
||||||
|
### Search mode
|
||||||
|
|
||||||
|
| Key(s) or Key Group | Behavior |
|
||||||
|
| ------------------------------------------- | ---------------------------------------- |
|
||||||
|
| `CLOSE` group | Close search mode |
|
||||||
|
|
||||||
|
### Editions page
|
||||||
|
|
||||||
|
| Key(s) or Key Group | Behavior |
|
||||||
|
| ------------------------------------------- | ---------------------------------------- |
|
||||||
|
| `CLOSE` group | Close editions page |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<a name="troubleshooting"></a>
|
||||||
|
|
||||||
## Troubleshooting Guide
|
## Troubleshooting Guide
|
||||||
|
|
||||||
|
@ -378,6 +522,10 @@ We suggest to add to you activity in the `onCreate` method.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<a name="authors"></a>
|
||||||
|
|
||||||
## Authors
|
## Authors
|
||||||
Nicolò Aquilini, iOS Software developer, Tecnavia
|
Nicolò Aquilini, iOS Software developer, Tecnavia
|
||||||
|
|
||||||
|
|
16
build.gradle
16
build.gradle
|
@ -90,7 +90,7 @@ publishing {
|
||||||
tareactnativecookiescookies(MavenPublication) {
|
tareactnativecookiescookies(MavenPublication) {
|
||||||
groupId 'tecnavia'
|
groupId 'tecnavia'
|
||||||
artifactId 'react-native-cookies_cookies'
|
artifactId 'react-native-cookies_cookies'
|
||||||
version '6.2.0'
|
version '6.2.1'
|
||||||
artifact("$libsDirName/react-native-cookies_cookies-release.aar")
|
artifact("$libsDirName/react-native-cookies_cookies-release.aar")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ publishing {
|
||||||
tareactnativetecnaviautils(MavenPublication) {
|
tareactnativetecnaviautils(MavenPublication) {
|
||||||
groupId 'tecnavia'
|
groupId 'tecnavia'
|
||||||
artifactId 'react-native-tecnavia-utils'
|
artifactId 'react-native-tecnavia-utils'
|
||||||
version '1.3.1'
|
version '1.3.2'
|
||||||
artifact("$libsDirName/react-native-tecnavia-utils-release.aar")
|
artifact("$libsDirName/react-native-tecnavia-utils-release.aar")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -286,7 +286,7 @@ publishing {
|
||||||
tatecnaviareactnativebridge(MavenPublication) {
|
tatecnaviareactnativebridge(MavenPublication) {
|
||||||
groupId 'tecnavia'
|
groupId 'tecnavia'
|
||||||
artifactId 'tecnavia_react-native-bridge'
|
artifactId 'tecnavia_react-native-bridge'
|
||||||
version '1.3.11'
|
version '1.3.14'
|
||||||
artifact("$libsDirName/tecnavia_react-native-bridge-release.aar")
|
artifact("$libsDirName/tecnavia_react-native-bridge-release.aar")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -335,7 +335,7 @@ publishing {
|
||||||
tatecnaviareactnativewebanalytics(MavenPublication) {
|
tatecnaviareactnativewebanalytics(MavenPublication) {
|
||||||
groupId 'tecnavia'
|
groupId 'tecnavia'
|
||||||
artifactId 'tecnavia_react-native-web-analytics'
|
artifactId 'tecnavia_react-native-web-analytics'
|
||||||
version '1.0.2'
|
version '1.2.0'
|
||||||
artifact("$libsDirName/tecnavia_react-native-web-analytics-release.aar")
|
artifact("$libsDirName/tecnavia_react-native-web-analytics-release.aar")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -451,7 +451,7 @@ dependencies {
|
||||||
implementation "tecnavia:react-native-community_netinfo:11.4.1"
|
implementation "tecnavia:react-native-community_netinfo:11.4.1"
|
||||||
implementation "tecnavia:react-native-community_slider:2.0.9"
|
implementation "tecnavia:react-native-community_slider:2.0.9"
|
||||||
implementation "tecnavia:react-native-config:1.4.11"
|
implementation "tecnavia:react-native-config:1.4.11"
|
||||||
implementation "tecnavia:react-native-cookies_cookies:6.2.0"
|
implementation "tecnavia:react-native-cookies_cookies:6.2.1"
|
||||||
implementation "tecnavia:react-native-device-info:8.7.1"
|
implementation "tecnavia:react-native-device-info:8.7.1"
|
||||||
implementation "tecnavia:react-native-dynamic-fonts:0.3.2"
|
implementation "tecnavia:react-native-dynamic-fonts:0.3.2"
|
||||||
implementation "tecnavia:react-native-fast-image:8.5.11"
|
implementation "tecnavia:react-native-fast-image:8.5.11"
|
||||||
|
@ -470,7 +470,7 @@ dependencies {
|
||||||
implementation "tecnavia:react-native-splash-screen:3.2.0"
|
implementation "tecnavia:react-native-splash-screen:3.2.0"
|
||||||
implementation "tecnavia:react-native-sqlite-storage:3.3.10"
|
implementation "tecnavia:react-native-sqlite-storage:3.3.10"
|
||||||
implementation "tecnavia:react-native-svg:15.7.1"
|
implementation "tecnavia:react-native-svg:15.7.1"
|
||||||
implementation "tecnavia:react-native-tecnavia-utils:1.3.1"
|
implementation "tecnavia:react-native-tecnavia-utils:1.3.2"
|
||||||
implementation "tecnavia:react-native-text-size:3.0.0"
|
implementation "tecnavia:react-native-text-size:3.0.0"
|
||||||
implementation "tecnavia:react-native-tts:4.1.1"
|
implementation "tecnavia:react-native-tts:4.1.1"
|
||||||
implementation "tecnavia:react-native-uuid-generator:6.1.1"
|
implementation "tecnavia:react-native-uuid-generator:6.1.1"
|
||||||
|
@ -479,14 +479,14 @@ dependencies {
|
||||||
implementation "tecnavia:react-native-volume-control:1.0.1"
|
implementation "tecnavia:react-native-volume-control:1.0.1"
|
||||||
implementation "tecnavia:react-native-webview:12.4.0"
|
implementation "tecnavia:react-native-webview:12.4.0"
|
||||||
implementation "tecnavia:rn-fetch-blob:0.11.2"
|
implementation "tecnavia:rn-fetch-blob:0.11.2"
|
||||||
api "tecnavia:tecnavia_react-native-bridge:1.3.11"
|
api "tecnavia:tecnavia_react-native-bridge:1.3.14"
|
||||||
implementation "tecnavia:tecnavia_react-native-default-preference:1.5.0"
|
implementation "tecnavia:tecnavia_react-native-default-preference:1.5.0"
|
||||||
implementation "tecnavia:tecnavia_react-native-dfp:1.5.0"
|
implementation "tecnavia:tecnavia_react-native-dfp:1.5.0"
|
||||||
implementation "tecnavia:tecnavia_react-native-geolocation:3.0.1"
|
implementation "tecnavia:tecnavia_react-native-geolocation:3.0.1"
|
||||||
implementation "tecnavia:tecnavia_react-native-navigation-bar-color:2.0.2"
|
implementation "tecnavia:tecnavia_react-native-navigation-bar-color:2.0.2"
|
||||||
implementation "tecnavia:tecnavia_react-native-pdf:5.1.8"
|
implementation "tecnavia:tecnavia_react-native-pdf:5.1.8"
|
||||||
implementation "tecnavia:tecnavia_react-native-print:0.6.1"
|
implementation "tecnavia:tecnavia_react-native-print:0.6.1"
|
||||||
implementation "tecnavia:tecnavia_react-native-web-analytics:1.0.2"
|
implementation "tecnavia:tecnavia_react-native-web-analytics:1.2.0"
|
||||||
implementation "tecnavia:tecnavia_react-native-zip-archive:5.2.0"
|
implementation "tecnavia:tecnavia_react-native-zip-archive:5.2.0"
|
||||||
api "tecnavia:react-native:0.70.15"
|
api "tecnavia:react-native:0.70.15"
|
||||||
implementation "tecnavia:android-jsc:1.0.0"
|
implementation "tecnavia:android-jsc:1.0.0"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
|
|
||||||
APP_NAME=Android SDK
|
APP_NAME=Android SDK
|
||||||
APP_VERSION_NAME=3.18.12
|
APP_VERSION_NAME=3.18.19
|
||||||
APP_VERSION_CODE=1744382517288
|
APP_VERSION_CODE=1747226748505
|
||||||
ANDROID_APP_ID=com.tecnaviaapplication
|
ANDROID_APP_ID=com.tecnaviaapplication
|
||||||
IS_ADDON=true
|
IS_ADDON=true
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue