Posts

Showing posts from December, 2019

Recyclerview Retrofit

@FormUrlEncoded @POST ( "scategory_product" ) Call<ProductModel> GetProduct( @Field ( "AccessKey" ) String key, @Field ( "Language" ) String Language, @Field ( "Sub_Category_Id" ) String Sub_Category_Id); < LinearLayout android :id ="@+id/lnr_main" android :layout_width ="match_parent" android :layout_height ="match_parent" android :orientation ="vertical" > < androidx.core.widget.NestedScrollView android :layout_width ="match_parent" android :layout_height ="match_parent" android :layout_weight ="1" > < LinearLayout android :layout_width ="match_parent" android :layout_height ="match_parent" android :layout_weight ="1" android :orientation ="vertical" ...

Retrofit Login Page 2020

Dependency implementation 'com.squareup.retrofit2:retrofit:2.5.0' implementation 'com.squareup.retrofit2:converter-gson:2.5.0' private void Login() { String device_key = Settings.Secure. getString ( activity .getApplication().getContentResolver(), Settings.Secure. ANDROID_ID ); // String device_key = Constant.FIREBASE_TOKEN; Log. e ( "Device Key=" , device_key); progressDialog .setTitle(getResources().getString(R.string. please_wait )); progressDialog .setMessage(getResources().getString(R.string. loading )); progressDialog .show(); ApiInterface apiService = ApiClient. getClient ( activity ).create(ApiInterface. class ); Call<JsonObject> call = apiService.Login(Constant. ACCESSKEY , name , pass , device_key); call.enqueue( new Callback<JsonObject>() { @Override public void onResponse(Call<JsonObject> call, Response<JsonObject> response) { progressDialog .dismiss(...