Implementato dynamic load module per VGAlimenti.
Implementato framework per gestire le path.
This commit is contained in:
parent
d46a92eecf
commit
996f5978e9
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@ -10,6 +10,7 @@
|
|||||||
<option value="$PROJECT_DIR$" />
|
<option value="$PROJECT_DIR$" />
|
||||||
<option value="$PROJECT_DIR$/app" />
|
<option value="$PROJECT_DIR$/app" />
|
||||||
<option value="$PROJECT_DIR$/barcode_base_library" />
|
<option value="$PROJECT_DIR$/barcode_base_library" />
|
||||||
|
<option value="$PROJECT_DIR$/dynamic_vgalimenti" />
|
||||||
<option value="$PROJECT_DIR$/pointmobilescannerlibrary" />
|
<option value="$PROJECT_DIR$/pointmobilescannerlibrary" />
|
||||||
<option value="$PROJECT_DIR$/waterfall_toolbar" />
|
<option value="$PROJECT_DIR$/waterfall_toolbar" />
|
||||||
</set>
|
</set>
|
||||||
|
|||||||
1
.idea/modules.xml
generated
1
.idea/modules.xml
generated
@ -5,6 +5,7 @@
|
|||||||
<module fileurl="file://$PROJECT_DIR$/WMS_Native.iml" filepath="$PROJECT_DIR$/WMS_Native.iml" />
|
<module fileurl="file://$PROJECT_DIR$/WMS_Native.iml" filepath="$PROJECT_DIR$/WMS_Native.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
|
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/barcode_base_library/barcode_base_library.iml" filepath="$PROJECT_DIR$/barcode_base_library/barcode_base_library.iml" />
|
<module fileurl="file://$PROJECT_DIR$/barcode_base_library/barcode_base_library.iml" filepath="$PROJECT_DIR$/barcode_base_library/barcode_base_library.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/dynamic_vgalimenti/dynamic_vgalimenti.iml" filepath="$PROJECT_DIR$/dynamic_vgalimenti/dynamic_vgalimenti.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/pointmobilescannerlibrary/pointmobilescannerlibrary.iml" filepath="$PROJECT_DIR$/pointmobilescannerlibrary/pointmobilescannerlibrary.iml" />
|
<module fileurl="file://$PROJECT_DIR$/pointmobilescannerlibrary/pointmobilescannerlibrary.iml" filepath="$PROJECT_DIR$/pointmobilescannerlibrary/pointmobilescannerlibrary.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/waterfall_toolbar/waterfall_toolbar.iml" filepath="$PROJECT_DIR$/waterfall_toolbar/waterfall_toolbar.iml" />
|
<module fileurl="file://$PROJECT_DIR$/waterfall_toolbar/waterfall_toolbar.iml" filepath="$PROJECT_DIR$/waterfall_toolbar/waterfall_toolbar.iml" />
|
||||||
</modules>
|
</modules>
|
||||||
|
|||||||
@ -80,6 +80,10 @@ android {
|
|||||||
lintOptions {
|
lintOptions {
|
||||||
abortOnError false
|
abortOnError false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dynamicFeatures = [":dynamic_vgalimenti"]
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@ -89,16 +93,16 @@ dependencies {
|
|||||||
})
|
})
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||||
implementation 'com.orhanobut:logger:2.2.0'
|
implementation 'com.orhanobut:logger:2.2.0'
|
||||||
implementation 'com.google.firebase:firebase-core:16.0.6'
|
implementation 'com.google.firebase:firebase-core:16.0.7'
|
||||||
implementation 'com.google.firebase:firebase-crash:16.2.1'
|
implementation 'com.google.firebase:firebase-crash:16.2.1'
|
||||||
implementation 'com.google.firebase:firebase-perf:16.2.3'
|
implementation 'com.google.firebase:firebase-perf:16.2.3'
|
||||||
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.8'
|
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.8'
|
||||||
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
|
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
|
||||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||||
implementation 'com.google.android.material:material:1.1.0-alpha02'
|
implementation 'com.google.android.material:material:1.1.0-alpha03'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha01'
|
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha02'
|
||||||
implementation 'androidx.preference:preference:1.1.0-alpha02'
|
implementation 'androidx.preference:preference:1.1.0-alpha02'
|
||||||
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
|
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
|
||||||
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
|
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
|
||||||
@ -108,8 +112,8 @@ dependencies {
|
|||||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
|
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
|
||||||
implementation 'androidx.lifecycle:lifecycle-common-java8:2.0.0'
|
implementation 'androidx.lifecycle:lifecycle-common-java8:2.0.0'
|
||||||
kapt "androidx.lifecycle:lifecycle-compiler:2.0.0"
|
kapt "androidx.lifecycle:lifecycle-compiler:2.0.0"
|
||||||
//implementation "com.emreeran.permissionlivedata:permissionlivedata:1.0.4"
|
implementation 'com.danielpuiu:ghostfish:2.0.0'
|
||||||
//implementation 'com.karumi:dexter:5.0.0'
|
annotationProcessor "com.danielpuiu:ghostfish-compiler:2.0.0"
|
||||||
//MVVM
|
//MVVM
|
||||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
|
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
|
||||||
annotationProcessor "androidx.lifecycle:lifecycle-compiler:2.0.0"
|
annotationProcessor "androidx.lifecycle:lifecycle-compiler:2.0.0"
|
||||||
@ -122,7 +126,6 @@ dependencies {
|
|||||||
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
|
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
|
||||||
implementation 'br.com.zbra:android-linq:1.1.0'
|
implementation 'br.com.zbra:android-linq:1.1.0'
|
||||||
//FAB
|
//FAB
|
||||||
//implementation 'com.getbase:floatingactionbutton:1.10.1'
|
|
||||||
implementation 'com.github.clans:fab:1.6.4'
|
implementation 'com.github.clans:fab:1.6.4'
|
||||||
//CUSTOM VIEWS
|
//CUSTOM VIEWS
|
||||||
implementation 'com.github.NaimishTrivedi:FBToast:1.0'
|
implementation 'com.github.NaimishTrivedi:FBToast:1.0'
|
||||||
|
|||||||
@ -0,0 +1,78 @@
|
|||||||
|
package it.integry.integrywmsnative.core.class_router;
|
||||||
|
|
||||||
|
import android.util.Pair;
|
||||||
|
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.class_router.exceptions.MethodParameterTypeNotMatchException;
|
||||||
|
import it.integry.integrywmsnative.core.class_router.exceptions.MethodParamsCountException;
|
||||||
|
import it.integry.integrywmsnative.core.class_router.exceptions.MethodPathAlreadyDeclaredException;
|
||||||
|
import it.integry.integrywmsnative.core.class_router.exceptions.MethodPathNotRegisteredException;
|
||||||
|
|
||||||
|
public class BaseRouter {
|
||||||
|
|
||||||
|
|
||||||
|
private static List<Pair<String, MethodDTO>> mRoutePaths = new ArrayList<>();
|
||||||
|
|
||||||
|
private static boolean checkIfMethodExists(String path) {
|
||||||
|
boolean methodAlreadyDeclared = false;
|
||||||
|
|
||||||
|
for(int i = 0; i < mRoutePaths.size() && !methodAlreadyDeclared; i++) {
|
||||||
|
if(mRoutePaths.get(i).first.equalsIgnoreCase(path)) methodAlreadyDeclared = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return methodAlreadyDeclared;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int getMethodIndex(String path) {
|
||||||
|
for(int i = 0; i < mRoutePaths.size(); i++) {
|
||||||
|
if(mRoutePaths.get(i).first.equalsIgnoreCase(path)) return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void registerPath(String path, MethodDTO method) throws MethodPathAlreadyDeclaredException {
|
||||||
|
if(checkIfMethodExists(path)) {
|
||||||
|
throw new MethodPathAlreadyDeclaredException(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
mRoutePaths.add(new Pair<>(path, method));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void deregisterPath(String path) {
|
||||||
|
if(checkIfMethodExists(path)) {
|
||||||
|
mRoutePaths.remove(getMethodIndex(path));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void invokePath(String path, Object... params) throws MethodPathNotRegisteredException, MethodParamsCountException, MethodParameterTypeNotMatchException, InvocationTargetException, IllegalAccessException {
|
||||||
|
if(!checkIfMethodExists(path)) {
|
||||||
|
throw new MethodPathNotRegisteredException(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
MethodDTO methodDTO = mRoutePaths.get(getMethodIndex(path)).second;
|
||||||
|
|
||||||
|
Class[] methodParameters = methodDTO.getMethod().getParameterTypes();
|
||||||
|
|
||||||
|
if(methodParameters.length != params.length) {
|
||||||
|
throw new MethodParamsCountException(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int i = 0; i < params.length; i++) {
|
||||||
|
if(params[i].getClass() != methodParameters[i] && methodParameters[i].cast(params[i]) == null) {
|
||||||
|
throw new MethodParameterTypeNotMatchException(params[i].getClass().getCanonicalName(), path, methodParameters[i].getCanonicalName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
methodDTO.getMethod().invoke(null, params);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
package it.integry.integrywmsnative.core.class_router;
|
||||||
|
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
|
public class MethodDTO {
|
||||||
|
|
||||||
|
private Method method;
|
||||||
|
|
||||||
|
public Method getMethod() {
|
||||||
|
return method;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MethodDTO setMethod(Method method) {
|
||||||
|
this.method = method;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static MethodDTO fromName(Class clazz, String methodName) {
|
||||||
|
Method[] methods = clazz.getMethods();
|
||||||
|
for (Method m : methods) {
|
||||||
|
if (methodName.equals(m.getName())) {
|
||||||
|
return new MethodDTO().setMethod(m);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
package it.integry.integrywmsnative.core.class_router.exceptions;
|
||||||
|
|
||||||
|
public class MethodParameterTypeNotMatchException extends Exception{
|
||||||
|
|
||||||
|
public MethodParameterTypeNotMatchException(String path, String type1, String type2) {
|
||||||
|
super(String.format("The given parameter (%s) to %s don't match the required type %s", type1, path, type2));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
package it.integry.integrywmsnative.core.class_router.exceptions;
|
||||||
|
|
||||||
|
public class MethodParamsCountException extends Exception {
|
||||||
|
|
||||||
|
public MethodParamsCountException(String path) {
|
||||||
|
super(String.format("Given parameters to path %s do not match the real method declaration", path));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package it.integry.integrywmsnative.core.class_router.exceptions;
|
||||||
|
|
||||||
|
public class MethodPathAlreadyDeclaredException extends Exception {
|
||||||
|
|
||||||
|
public MethodPathAlreadyDeclaredException(String path) {
|
||||||
|
|
||||||
|
super(String.format("Method %s is already declared in this scope", path));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
package it.integry.integrywmsnative.core.class_router.exceptions;
|
||||||
|
|
||||||
|
public class MethodPathNotRegisteredException extends Exception{
|
||||||
|
|
||||||
|
public MethodPathNotRegisteredException(String path){
|
||||||
|
super(String.format("Method path %s isn't registered at the moment. Please call BaseRouter.registerPath before call invoke.", path));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -3,21 +3,19 @@ package it.integry.integrywmsnative.core.context;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import com.crashlytics.android.Crashlytics;
|
import com.crashlytics.android.Crashlytics;
|
||||||
|
import com.danielpuiu.ghostfish.GhostFish;
|
||||||
import com.orhanobut.logger.AndroidLogAdapter;
|
import com.orhanobut.logger.AndroidLogAdapter;
|
||||||
import com.orhanobut.logger.Logger;
|
import com.orhanobut.logger.Logger;
|
||||||
|
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
import io.fabric.sdk.android.Fabric;
|
import io.fabric.sdk.android.Fabric;
|
||||||
import it.integry.integrywmsnative.BuildConfig;
|
import it.integry.integrywmsnative.BuildConfig;
|
||||||
import it.integry.integrywmsnative.core.REST.consumers.ColliMagazzinoRESTConsumer;
|
|
||||||
import it.integry.integrywmsnative.core.REST.model.DistribuzioneColloDTO;
|
|
||||||
import it.integry.integrywmsnative.core.REST.watcher.ServerStatusChecker;
|
import it.integry.integrywmsnative.core.REST.watcher.ServerStatusChecker;
|
||||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecover;
|
import it.integry.integrywmsnative.core.data_recover.ColliDataRecover;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
|
||||||
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.settings.Stash;
|
import it.integry.integrywmsnative.core.settings.Stash;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
||||||
@ -47,6 +45,8 @@ public class AppContext {
|
|||||||
this.initLogger();
|
this.initLogger();
|
||||||
|
|
||||||
this.initRecoverColli();
|
this.initRecoverColli();
|
||||||
|
|
||||||
|
this.initReflections();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -90,4 +90,27 @@ public class AppContext {
|
|||||||
ColliDataRecover.init(mContext);
|
ColliDataRecover.init(mContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void initReflections() {
|
||||||
|
GhostFish.create(mContext);
|
||||||
|
|
||||||
|
try {
|
||||||
|
String initMethod = "init";
|
||||||
|
|
||||||
|
Class dynamicContextClass = Class.forName("it.integry.wms.dynamic_customization.DynamicContext");
|
||||||
|
|
||||||
|
Method[] methods = dynamicContextClass.getMethods();
|
||||||
|
for (Method m : methods) {
|
||||||
|
if (initMethod.equals(m.getName())) {
|
||||||
|
// for static methods we can use null as instance of class
|
||||||
|
m.invoke(null);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,11 @@
|
|||||||
package it.integry.integrywmsnative.core.context;
|
package it.integry.integrywmsnative.core.context;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import it.integry.integrywmsnative.core.class_router.BaseRouter;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogSimpleMessageHelper;
|
import it.integry.integrywmsnative.view.dialogs.DialogSimpleMessageHelper;
|
||||||
|
|
||||||
@ -19,6 +22,14 @@ public class MainContext {
|
|||||||
this.initDBData(() -> {
|
this.initDBData(() -> {
|
||||||
onContextInitialized.run();
|
onContextInitialized.run();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
BaseRouter.invokePath("testToast", mContext);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.e("PIF", ex.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -182,5 +182,6 @@
|
|||||||
|
|
||||||
<string name="recovering_data">Recovering data</string>
|
<string name="recovering_data">Recovering data</string>
|
||||||
<string name="wait_a_moment">Wait a moment</string>
|
<string name="wait_a_moment">Wait a moment</string>
|
||||||
|
<string name="title_dynamic_vgalimenti">Personalizzazione VGAlimenti</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@ -15,7 +15,7 @@ buildscript {
|
|||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "com.android.tools.build:gradle:3.3.0"
|
classpath 'com.android.tools.build:gradle:3.3.1'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
classpath 'com.google.gms:google-services:4.2.0'
|
classpath 'com.google.gms:google-services:4.2.0'
|
||||||
classpath 'com.google.firebase:firebase-plugins:1.1.5'
|
classpath 'com.google.firebase:firebase-plugins:1.1.5'
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 572 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 MiB |
1
dynamic_vgalimenti/.gitignore
vendored
Normal file
1
dynamic_vgalimenti/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/build
|
||||||
BIN
dynamic_vgalimenti/Integry.jks
Normal file
BIN
dynamic_vgalimenti/Integry.jks
Normal file
Binary file not shown.
31
dynamic_vgalimenti/build.gradle
Normal file
31
dynamic_vgalimenti/build.gradle
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
apply plugin: 'com.android.dynamic-feature'
|
||||||
|
|
||||||
|
android {
|
||||||
|
signingConfigs {
|
||||||
|
release {
|
||||||
|
keyAlias 'wms key'
|
||||||
|
keyPassword 'inpmiy'
|
||||||
|
storeFile file('Integry.jks')
|
||||||
|
storePassword 'inpmiy'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileSdkVersion 28
|
||||||
|
defaultConfig {
|
||||||
|
minSdkVersion 21
|
||||||
|
targetSdkVersion 28
|
||||||
|
versionCode 1
|
||||||
|
versionName "1.0"
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
buildToolsVersion '28.0.3'
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
|
implementation project(':app')
|
||||||
|
}
|
||||||
12
dynamic_vgalimenti/src/main/AndroidManifest.xml
Normal file
12
dynamic_vgalimenti/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:dist="http://schemas.android.com/apk/distribution"
|
||||||
|
package="it.integry.wms.dynamic_customization">
|
||||||
|
|
||||||
|
<dist:module
|
||||||
|
dist:instant="false"
|
||||||
|
dist:onDemand="true"
|
||||||
|
dist:title="@string/title_dynamic_vgalimenti">
|
||||||
|
<dist:fusing dist:include="true" />
|
||||||
|
</dist:module>
|
||||||
|
</manifest>
|
||||||
|
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
package it.integry.wms.dynamic_customization;
|
||||||
|
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.class_router.BaseRouter;
|
||||||
|
import it.integry.integrywmsnative.core.class_router.MethodDTO;
|
||||||
|
import it.integry.integrywmsnative.core.class_router.exceptions.MethodPathAlreadyDeclaredException;
|
||||||
|
|
||||||
|
public class DynamicContext {
|
||||||
|
|
||||||
|
public static void init() {
|
||||||
|
Log.d("DynamicContext", "Caricamento personalizzazioni per VGAlimenti");
|
||||||
|
|
||||||
|
try {
|
||||||
|
BaseRouter.registerPath("testToast", MethodDTO.fromName(OrdineVendita.class, "testMe"));
|
||||||
|
BaseRouter.registerPath("distribuzioneColloV", MethodDTO.fromName(OrdineVendita.class, "distribuisciColloV"));
|
||||||
|
|
||||||
|
} catch (MethodPathAlreadyDeclaredException ex) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d("DynamicContext", "Caricamento personalizzazioni per VGAlimenti COMPLETATO");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package it.integry.wms.dynamic_customization;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
public class OrdineVendita {
|
||||||
|
|
||||||
|
|
||||||
|
public static void testMe(Context context) {
|
||||||
|
Toast.makeText(context, "Questo è un fottuto test di questo maledetto framework", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void distribuisciColloV() {
|
||||||
|
Log.d("OrdineVendita", "Completata distribuzione collo");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1 +1 @@
|
|||||||
include ':app', ':pointmobilescannerlibrary', ':waterfall_toolbar', ':barcode_base_library'
|
include ':app', ':pointmobilescannerlibrary', ':waterfall_toolbar', ':barcode_base_library', ':dynamic_vgalimenti'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user