NStack Library

nstack.io library for translations, update management and more.

License

License

GroupId

GroupId

dk.nodes.nstack
ArtifactId

ArtifactId

nstack
Last Version

Last Version

0.81
Release Date

Release Date

Type

Type

aar
Description

Description

NStack Library
nstack.io library for translations, update management and more.
Project URL

Project URL

https://github.com/nodes-android/nstack
Source Code Management

Source Code Management

https://github.com/nodes-android/nstack

Download nstack

How to add to project

<!-- https://jarcasting.com/artifacts/dk.nodes.nstack/nstack/ -->
<dependency>
    <groupId>dk.nodes.nstack</groupId>
    <artifactId>nstack</artifactId>
    <version>0.81</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/dk.nodes.nstack/nstack/
implementation 'dk.nodes.nstack:nstack:0.81'
// https://jarcasting.com/artifacts/dk.nodes.nstack/nstack/
implementation ("dk.nodes.nstack:nstack:0.81")
'dk.nodes.nstack:nstack:aar:0.81'
<dependency org="dk.nodes.nstack" name="nstack" rev="0.81">
  <artifact name="nstack" type="aar" />
</dependency>
@Grapes(
@Grab(group='dk.nodes.nstack', module='nstack', version='0.81')
)
libraryDependencies += "dk.nodes.nstack" % "nstack" % "0.81"
[dk.nodes.nstack/nstack "0.81"]

Dependencies

compile (3)

Group / Artifact Type Version
com.android.support » appcompat-v7 jar 27.1.1
com.squareup.okhttp3 : okhttp jar 3.9.0
com.squareup.okhttp3 : logging-interceptor jar 3.9.0

Project Modules

There are no modules declared in this project.

NStack

Add explanation here

Usage

in Application Class: NStack.init(context, applicationId, restApiKey); NStack.getStack().enableDebug(); NStack.getStack().translationClass(Translation.class);

In Activity, Fragment or ViewGroup (or any class with views as fields/children)

@BindView(R.id.text_view)

@Translate("section.key")

TextView textView;

and in onCreate/onStart or onResume: NStack.getStack().translate(this);

Download

Gradle:

dependencies {
  compile 'dk.nodes.nstack:nstack:0.76'
}

Setup from AndroidManifest.xml

If using version >= 0.76 NStack can also be configured from the manifest. Simply add meta values to the application object like this:

<meta-data android:name="dk.nodes.nstack.appId" android:value="appid" />
        <meta-data android:name="dk.nodes.nstack.apiKey" android:value="apikey" />

Version control simulator

Inorder to test version control easily version 0.76 and above makes it possible to enable a version control simulator. This should ONLY be added to debug builds. To use make a file called AndroidManifest.xml and place it under /src/debug. File content should look like this:

<?xml version="1.0" encoding="utf-8"?>
<manifest package="dk.nodes.alkafuel"
          xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools">

    <application>
        <activity
            android:name="dk.nodes.nstack.NStackDebugActivity"
            android:icon="@drawable/ic_launcher"
            android:label="APPNAME Debug menu"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateHidden|adjustResize">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>
</manifest>

What this does is add another launcher activity but only in debug builds. This result in the app getting and extra icon with label being the one in android:label. This activity can be started independently of the main app and version control simulation can be enabled disabled. Changes persist til app is force quitted either by the user or the Android runtime.

Check Example project to see all of the uses

dk.nodes.nstack

Nodes - Android

Versions

Version
0.81
0.80
0.79
0.78
0.77
0.76
0.75
0.74
0.72
0.71
0.70
0.69
0.68
0.67
0.66
0.65
0.64
0.62
0.61
0.60
0.59
0.58
0.56
0.55
0.53
0.52
0.51
0.31
0.25
0.24
0.23
0.22-deploytest
0.22
0.21
0.5
0.4
0.3
0.2
0.1