Skip to content

Instantly share code, notes, and snippets.

View imrankst1221's full-sized avatar
🎯
Focusing

Md. Imran Choudhury imrankst1221

🎯
Focusing
View GitHub Profile
@imrankst1221
imrankst1221 / UserApiService.kt
Last active November 4, 2018 09:23
Get request with link query
interface UserApiService {
@Headers("Content-Type: application/json")
@GET("user")
fun getUser(
@Query("Authorization") authorizationKey: String, // authentication header
@Query("UserID") userID: String
)
}
@imrankst1221
imrankst1221 / LoginApiService.kt
Last active November 4, 2018 09:46
ApiService for post data with Authorization
interface LoginApiService {
@Headers("Content-Type: application/json")
@POST("login")
fun doLogin(
//@Query("Authorization") authorizationKey: String, // authentication header
@Body loginPostData: LoginPostData): Observable<LoginResponse> // body data
}
data class LoginPostData(
@SerializedName("UserId") var userID: String,
@imrankst1221
imrankst1221 / ApiService.kt
Created November 4, 2018 09:31
Retrofit Client Builder
object ApiService {
private val TAG = "--ApiService"
fun loginApiCall() = Retrofit.Builder()
.baseUrl(Constants.API_BASE_PATH)
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.addConverterFactory(ApiWorker.gsonConverter)
.client(ApiWorker.client)
.build()
.create(LoginApiService::class.java)!!
@imrankst1221
imrankst1221 / LoginResponse.Kt
Created November 4, 2018 09:16
Parse JSON to data class using GSON
data class LoginResponse(
@SerializedName("status") val status: Int = 0,
@SerializedName("error") val error: String = "",
@SerializedName("error_type") val errorType: String = "",
@Expose(deserialize = false) // deserialize is this filed is not required
@SerializedName("message") val message: String = ""
)
@imrankst1221
imrankst1221 / ApiWorker.kt
Created November 4, 2018 06:37
Create OkHttpClient worker
object ApiWorker {
private var mClient: OkHttpClient? = null
private var mGsonConverter: GsonConverterFactory? = null
/**
* Don't forget to remove Interceptors (or change Logging Level to NONE)
* in production! Otherwise people will be able to see your request and response on Log Cat.
*/
val client: OkHttpClient
@Throws(NoSuchAlgorithmException::class, KeyManagementException::class)
@imrankst1221
imrankst1221 / build.gradle
Last active November 4, 2018 09:52
Add Dependent Libraries and Permission on build.gradle (Module app)
//https://github.com/google/gson
implementation 'com.google.code.gson:gson:2.8.5'
//https://github.com/square/okhttp
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
// https://github.com/square/retrofit
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
Privacy Policy for RocketWeb App
Last updated: May 25, 2021
--------------------------------
This Privacy Policy describes Our policies and procedures on the collection, use and disclosure of Your information when You use the Service and tells You about Your privacy rights and how the law protects You.
We use Your Personal data to provide and improve the Service. By using the Service, You agree to the collection and use of information in accordance with this Privacy Policy. This Privacy Policy has been created with the help of the Privacy Policy Generator.
Interpretation:
The words of which the initial letter is capitalized have meanings defined under the following conditions. The following definitions shall have the same meaning regardless of whether they appear in singular or in plural.
@imrankst1221
imrankst1221 / gist:bd297c9a59f7ce15a2bfb2b936b59077
Created August 16, 2018 08:41
MediPress app privacy policy
Md. Imran Choudhury built the Medi Press app as a Free app. This SERVICE is provided by Md. Imran Choudhury at no cost and is intended for use as is.
This page is used to inform website visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Medi Press unless otherwise defined in this Privacy Policy.
Information Collection and Use
@imrankst1221
imrankst1221 / Chilis food park
Created August 16, 2018 08:38
Chilis food park app Privacy Policy
Md. Imran Choudhury built the Chilis food park app as a Free app. This SERVICE is provided by Md. Imran Choudhury at no cost and is intended for use as is.
This page is used to inform website visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Chilis food park unless otherwise defined in this Privacy Policy.
Information Collection and Use
Privacy Policy
Vsioniptv built the Scary Place app as an Open Source app. This SERVICE is provided by Vsioniptv at no cost and is intended for use as is.
This page is used to inform website visitors regarding our policies with the collection, use, and disclosure of Personal Information if anyone decided to use our Service.
If you choose to use our Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that we collect is used for providing and improving the Service. We will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Scary Place unless otherwise defined in this Privacy Policy.
Information Collection and Use