add project adins

This commit is contained in:
Alfrid Sanjaya Leo Putra 2024-07-25 14:44:22 +07:00
commit f8f85d679d
5299 changed files with 625430 additions and 0 deletions

View file

@ -0,0 +1,21 @@
package com.adins.mss.base.commons;
/**
* Created by Aditya Purwa on 1/6/2015.
* Indicate that an activity is implementing a model based activity.
*/
public interface ModeledActivity<T> {
/**
* Get the model for the activity.
*
* @return The model.
*/
public T getModel();
/**
* Set the model for the activity.
*
* @param model The model.
*/
public void setModel(T model);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 B

View file

@ -0,0 +1,68 @@
/*
* Copyright 2010 Emmanuel Astier & Kevin Gaudin
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.acra.collector;
import android.content.Context;
import android.os.Build;
import java.lang.reflect.Field;
/**
* Utility class containing methods enabling backward compatibility.
*
* @author Normal
*/
public final class Compatibility {
/**
* Retrieves Android SDK API level using the best possible method.
*
* @return The Android SDK API int level.
*/
public static int getAPILevel() {
int apiLevel;
try {
// This field has been added in Android 1.6
final Field SDK_INT = Build.VERSION.class.getField("SDK_INT");
apiLevel = SDK_INT.getInt(null);
} catch (SecurityException e) {
apiLevel = Build.VERSION.SDK_INT;
} catch (NoSuchFieldException e) {
apiLevel = Build.VERSION.SDK_INT;
} catch (IllegalArgumentException e) {
apiLevel = Build.VERSION.SDK_INT;
} catch (IllegalAccessException e) {
apiLevel = Build.VERSION.SDK_INT;
}
return apiLevel;
}
/**
* Retrieve the DropBoxManager service name using reflection API.
*
* @return Name of the DropBox service regardless of Android version.
* @throws NoSuchFieldException if the field DROPBOX_SERVICE doesn't exist.
* @throws IllegalAccessException if the DROPBOX_SERVICE field is inaccessible.
*/
public static String getDropBoxServiceName() throws NoSuchFieldException, IllegalAccessException {
final Field serviceName = Context.class.getField("DROPBOX_SERVICE");
if (serviceName != null) {
return (String) serviceName.get(null);
}
return null;
}
}

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@color/tv_gray"
android:padding="10dp">
<TextView
android:id="@+id/txtStatusOrder"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="15sp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="?android:attr/expandableListPreferredChildPaddingLeft"
android:textColor="@color/tv_darker"/>
</LinearLayout>

View file

@ -0,0 +1,57 @@
package com.adins.mss.coll.api;
import android.content.Context;
import com.adins.mss.base.GlobalData;
import com.adins.mss.base.crashlytics.FireCrash;
import com.adins.mss.base.util.Utility;
import com.adins.mss.coll.models.ReportSummaryResponse;
import com.adins.mss.constant.Global;
import com.adins.mss.foundation.http.HttpConnectionResult;
import com.adins.mss.foundation.http.HttpCryptedConnection;
import com.adins.mss.foundation.http.MssRequestType;
import com.google.firebase.perf.FirebasePerformance;
import com.google.firebase.perf.metrics.HttpMetric;
import com.google.gson.Gson;
/**
* Created by adityapurwa on 22/04/15.
*/
public class ReportSummaryApi {
private final Context context;
public ReportSummaryApi(Context context) {
this.context = context;
}
public ReportSummaryResponse request() {
boolean encrypt = GlobalData.getSharedGlobalData().isEncrypt();
boolean decrypt = GlobalData.getSharedGlobalData().isDecrypt();
HttpCryptedConnection httpConn = new HttpCryptedConnection(context, encrypt, decrypt);
Gson gson = new Gson();
MssRequestType request = new MssRequestType();
request.setAudit(GlobalData.getSharedGlobalData().getAuditData());
String data = gson.toJson(request);
ReportSummaryResponse response = null;
//Firebase Performance Trace HTTP Request
HttpMetric networkMetric =
FirebasePerformance.getInstance().newHttpMetric( GlobalData.getSharedGlobalData().getURL_GET_REPORTSUMMARY(), FirebasePerformance.HttpMethod.POST);
Utility.metricStart(networkMetric, data);
try {
HttpConnectionResult result = httpConn.requestToServer(
GlobalData.getSharedGlobalData().getURL_GET_REPORTSUMMARY(),
data, Global.DEFAULTCONNECTIONTIMEOUT);
String jsonResult = result.getResult();
Utility.metricStop(networkMetric, result);
response = gson.fromJson(jsonResult, ReportSummaryResponse.class);
}
catch (Exception e){
e.printStackTrace();
}
return response;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View file

@ -0,0 +1,33 @@
package com.adins.mss.odr.news;
import com.adins.mss.dao.MobileContentH;
import com.adins.mss.foundation.http.MssRequestType;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class JsonRequestNews extends MssRequestType{
@SerializedName("uuid_mobile_content_h")
String uuid_mobile_content_h;
@SerializedName("listContentHeader")
List<MobileContentH> listContentHeader;
public List<MobileContentH> getListContentHeader() {
return listContentHeader;
}
public void setListContentHeader(List<MobileContentH> listContentHeader) {
this.listContentHeader = listContentHeader;
}
public String getuuid_mobile_content_h(){
return uuid_mobile_content_h;
}
public void setuuid_mobile_content_h(String uuid_mobile_content_h){
this.uuid_mobile_content_h = uuid_mobile_content_h;
}
// public class ContentHeader extends ContentHeaderBean{
// public ContentHeader(MobileContentH contentH){
// super(contentH);
// }
// }
}