last day (15 days later) » 

05:45
Hi
bhai null aa raha
i tried with my api and it worked
may the issue with the api
ok i will give access to my api
i don't think because post man working
should I
05:47
Yes
Hey is it xml parsing ?
no
json
rest api
ok let me check can you give me your pojo
ok
public class ServiceOfflineAPI{

@SerializedName("Status")
@Expose
private Boolean status;
@SerializedName("Error")
@Expose
private String error;
@SerializedName("Message")
@Expose
private String message;

public String getData() {
return data;
}

public void setData(String data) {
this.data = data;
}

@SerializedName("Data")
@Expose
private String data;

public Boolean getStatus() {
return status;
}

public void setStatus(Boolean status) {
this.status = status;
}

public String getError() {
return error;
05:49
ok
@Entity(tableName = "cash")
public class Cash implements Serializable {
@PrimaryKey(autoGenerate = true)
private int id;

public int getId() {
return id;
}

public void setId(int id) {
this.id = id;
}

public String getUserID() {
return UserID;
}

public void setUserID(String userID) {
UserID = userID;
}

public String getShiftNo() {
return ShiftNo;
}

public void setShiftNo(String shiftNo) {
ShiftNo = shiftNo;
}

public String getFareAmount() {
return FareAmount;
}

public void setFareAmount(String fareAmount) {
code on gist
for reference
you can also check my MainActivity class where i am converting the list to jsonarray
06:06
Give me post man static request
[{"FareAmount":"70","LaneID":"12","PaymentType":"cash","PlazaID":"4","SealNo":"123","ShiftNo":"45125","TransactionId":"1000412","UserID":"Admin","VehicleClass":"7","VehicleNo":"Hr0101"},{"FareAmount":"70","LaneID":"12","PaymentType":"cash","PlazaID":"4","SealNo":"123","ShiftNo":"45125","TransactionId":"1001412","UserID":"Admin","VehicleClass":"7","VehicleNo":"Hr0101"}]
06:22
mahesh r u there?
yes
your data in request shows null
so i thinkg this is the issue
so what i have to do
I/okhttp.OkHttpClient: <-- 200 OK http://182.72.94.154:1001/Api/OfflineCashTransaction (610ms)
2020-09-04 11:57:32.564 10774-10832/com.tokbox.android.tutorials.simple_multiparty I/okhttp.OkHttpClient: Cache-Control: no-cache
2020-09-04 11:57:32.564 10774-10832/com.tokbox.android.tutorials.simple_multiparty I/okhttp.OkHttpClient: Pragma: no-cache
2020-09-04 11:57:32.564 10774-10832/com.tokbox.android.tutorials.simple_multiparty I/okhttp.OkHttpClient: Content-Type: application/json; charset=utf-8
see it shows null
i also checked the database the data sending through the api is not their
@Mahesh may b issue is with retrofit side
because it's not sending the data so the response is null
what you say
Issue in request
2020-09-04 11:57:32.567 10774-10832/com.tokbox.android.tutorials.simple_multiparty I/okhttp.OkHttpClient: null
it shoud show data what we passing
public AppServiceAPI createRetrofit(Context context) {
HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
logging.level(HttpLoggingInterceptor.Level.BODY);
OkHttpClient client = new OkHttpClient.Builder().connectionPool(new ConnectionPool(5, AppServiceAPI.TIMEOUT, TimeUnit.SECONDS)).connectTimeout(AppServiceAPI.TIMEOUT, TimeUnit.SECONDS).readTimeout(AppServiceAPI.TIMEOUT, TimeUnit.SECONDS).writeTimeout(AppServiceAPI.TIMEOUT, TimeUnit.SECONDS).addInterceptor(logging).build();
if (retrofit == null) {
for check log request
int TIMEOUT = 90;
int BUFFER = 100;
implementation 'com.squareup.okhttp3:logging-interceptor:4.7.2'
also update your alll gradle to new version for retorfit
Hey working
for me
RequestBody body = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"),(allDataArray).toString());
use this
but now it shows some error from db side
06:39
no issue the db error will be resolved...may the txn id duplicate error
Check this code is working
public AppServiceAPI createRetrofit(Context context) {
HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
logging.level(HttpLoggingInterceptor.Level.BODY);
OkHttpClient client = new OkHttpClient.Builder().connectionPool(new ConnectionPool(5, AppServiceAPI.TIMEOUT, TimeUnit.SECONDS)).connectTimeout(AppServiceAPI.TIMEOUT, TimeUnit.SECONDS).readTimeout(AppServiceAPI.TIMEOUT, TimeUnit.SECONDS).writeTimeout(AppServiceAPI.TIMEOUT, TimeUnit.SECONDS).addInterceptor(logging).build();
if (retrofit == null) {
ok let me try
Also update in group this issue resolved
HttpLoggingInterceptor ?
any dependency for this
yes i given
implementation 'com.squareup.okhttp3:logging-interceptor:4.7.2'
check this one
06:44
ok
@ChaudharyAmar working ?
gradle building
Ok
Here what i got in logcat with my code

2020-09-04 12:07:46.282 11057-11130/com.tokbox.android.tutorials.simple_multiparty I/okhttp.OkHttpClient: <-- 200 OK http://182.72.94.154:1001/Api/OfflineCashTransaction (379ms)
2020-09-04 12:07:46.284 11057-11130/com.tokbox.android.tutorials.simple_multiparty I/okhttp.OkHttpClient: Cache-Control: no-cache
2020-09-04 12:07:46.284 11057-11130/com.tokbox.android.tutorials.simple_multiparty I/okhttp.OkHttpClient: Pragma: no-cache
2020-09-04 12:07:46.284 11057-11130/com.tokbox.android.tutorials.simple_multiparty I/okhttp.OkHttpClient: Content-Type: applic
cannot resolve symbol Builder - OkHttpClient client = new OkHttpClient.Builder().
implementation 'com.squareup.okhttp:okhttp:2.5.0'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.7.2'
update to this
06:53
it worked for you with duplicate transaxtion id error . when we will chnage the txn id it will give proper response
is it wrong ?
I typed static data
so you need to pass dynamic
Let me know what issue facing in api now ?
cannot resolve method create(okhttp3.MediaType,java.lang.String)
07:17
implementation 'com.squareup.okhttp:okhttp:2.5.0'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.7.2'
have you updated this
Do you have teamviewer
any desk
yes give me id
774 428 008
07:20
pass
07:48
give me your gmail address
so i will add it
08:11
what is your skype id
or linked in id ?
09:04
amarbirsingh313
skype id
09:50
sent request
:)

last day (15 days later) »