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
package walltreesoft.petpals.api; | |
import android.content.Context; | |
import com.google.gson.Gson; | |
import com.google.gson.GsonBuilder; | |
import java.util.concurrent.TimeUnit; | |
import okhttp3.OkHttpClient; |
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
package walltreesoft.petpals.api.managers; | |
import java.util.Map; | |
import okhttp3.MultipartBody; | |
import okhttp3.RequestBody; | |
import retrofit2.http.Body; | |
import retrofit2.http.DELETE; | |
import retrofit2.http.GET; |
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
private void getTopics(){ | |
currentPage = PAGE_START; | |
progressDialog.show(); | |
Connector.getInstance(mMainActivity) | |
.getForumManager() | |
.getTopics("Bearer " + storeDataManager.getCurrentUser().token, String.valueOf(currentPage), String.valueOf(AMOUNT_TOPICS_I_GET)) | |
.subscribeOn(Schedulers.io()) | |
.observeOn(AndroidSchedulers.mainThread()) | |
.subscribe(rTopics -> { |
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
/** | |
* helpful method. | |
* | |
* Condition: '_date' must be GMT +0; | |
* | |
* Returns the time values that passed. (e.g. 4m ago, 18h ago, 5d ago...etc); | |
*/ | |
public static String getAgeOfMessage(String _date){ | |
String dateString = DateTimeConverter.getDate(_date) + " " + DateTimeConverter.getTimeWithoutOffset(_date); | |
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
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
package com.twelve.app.data.network.repositories.impl; | |
import android.annotation.SuppressLint; | |
import android.util.Log; | |
import com.google.gson.internal.LinkedTreeMap; | |
import com.google.gson.reflect.TypeToken; | |
import com.microsoft.signalr.HubConnection; | |
import com.microsoft.signalr.HubConnectionBuilder; | |
import com.microsoft.signalr.HubConnectionState; |
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
#1. gson | |
-keepclassmembers,allowobfuscation class * { | |
@com.google.gson.annotations.SerializedName <fields>; | |
} | |
-keepclassmembers enum * { | |
@com.google.gson.annotations.SerializedName <fields>; | |
} | |
-keep,allowobfuscation interface com.google.gson.annotations.SerializedName |