mehran22000 / aslbekharAndroid

1 stars 0 forks source link

The app does not report to the server Advertisement displays #31

Open mehran22000 opened 8 years ago

mehran22000 commented 8 years ago

Look at requirement document Item 20

aminsepahan commented 8 years ago

Done!

mehran22000 commented 8 years ago

I did Isfahan -> back button and this record was written in the database { "_id": { "$oid": "5786f660bd52c4110060ff8c" }, "name": null, "screen": null, "type": null, "device": null, "lat": null, "long": null, "date": "2016-07-14T02:18:08.263Z" }

aminsepahan commented 8 years ago

image

and post json data was: {"device":"cCmtEpQl7lM:APA91bHT3AttgwJmhj-NOUAGr_occnavrXf2xbmuF-WbWYpx9RgRkHRb9MQ4ywr47G2G3SKd0Cz7DDfq0i_ZVb9dOmfs9hDnJ1N8X_3p9_rhU-BT49VPmqBt3cJtvG1gT1Hgah6Y_Zdw","lat":"32.631253","lon":"51.6912649","name":"ad.031.png","screen":"MAIN","type":"FULL"}

mehran22000 commented 8 years ago

It works for some ads and not working for other ads.

screen shot 2016-07-19 at 22 36 40
mehran22000 commented 8 years ago

I just select isfahan. Can u check what you send to server here. Before I reset the database I saw some good messages but they all had device ids? is it related? Even if device id is not available we still want to have other info

mehran22000 commented 8 years ago

I am still getting null value in the server. When I try postman it works just fine.

screen shot 2016-07-26 at 23 33 16 screen shot 2016-07-26 at 23 33 00
mehran22000 commented 8 years ago

The top row is when you try postman and the bottom is from Android app. I also tried by putting your request in the postman and it works just fine {"device":"cCmtEpQl7lM:APA91bHT3AttgwJmhj-NOUAGr_occnavrXf2xbmuF-WbWYpx9RgRkHRb9MQ4ywr47G2G3SKd0Cz7DDfq0i_ZVb9dOmfs9hDnJ1N8X_3p9_rhU-BT49VPmqBt3cJtvG1gT1Hgah6Y_Zdw","lat":"32.631253","lon":"51.6912649","name":"ad.031.png","screen":"MAIN","type":"FULL"}

mehran22000 commented 8 years ago

Android is doing something funny with this service call. Can you check if it is similar to other services

mehran22000 commented 8 years ago

And server console logs: for postman: body and rec 2016-07-27T03:48:16.931014+00:00 app[web.1]: { device: 'cCmtEpQl7lM:APA91bHT3AttgwJmhj-NOUAGr_occnavrXf2xbmuF-WbWYpx9RgRkHRb9MQ4ywr47G2G3SKd0Cz7DDfq0i_ZVb9dOmfs9hDnJ1N8X_3p9_rhU-BT49VPmqBt3cJtvG1gT1Hgah6Y_Zdw', 2016-07-27T03:48:16.931016+00:00 app[web.1]: lat: '32.631253', 2016-07-27T03:48:16.931016+00:00 app[web.1]: lon: '51.6912649', 2016-07-27T03:48:16.931017+00:00 app[web.1]: screen: 'MAIN', 2016-07-27T03:48:16.931017+00:00 app[web.1]: type: 'FULL' } 2016-07-27T03:48:16.931205+00:00 app[web.1]: { name: 'ad.031.png', 2016-07-27T03:48:16.931211+00:00 app[web.1]: date: '2016-07-27T03:48:16.930Z' }

For Android 2016-07-27T03:40:40.998079+00:00 app[web.1]: Authentication Check 2016-07-27T03:40:40.998756+00:00 app[web.1]: { host: 'buyoriginal.herokuapp.com', 2016-07-27T03:40:40.999258+00:00 app[web.1]: post: /business/ad/displays 2016-07-27T03:40:40.999310+00:00 app[web.1]: body and rec 2016-07-27T03:40:40.999352+00:00 app[web.1]: {}

mehran22000 commented 8 years ago

So it seems the body is empty might be an issue with header?

aminsepahan commented 8 years ago

you know the thing is all the network request are using one single class with same headers every time :| you can also debug it yourself! just put break points in the class Network Requests, in package and see if everything is fine, because I did it and I didn't find anything ! image

image

I can also check again if you want though

aminsepahan commented 8 years ago

and please upgrade android to 2.2 preview 6 you might have to change update channel to canary builds

mehran22000 commented 8 years ago

Amin Jan, I think when you convert the adModel to Json it fails. postBody is empty.

screen shot 2016-08-06 at 21 24 17
aminsepahan commented 7 years ago

fixed befoew

mehran22000 commented 7 years ago

I do not think it was ever fixed. I need to check again. We just defered it

mehran22000 commented 7 years ago

I still have the same problem. It was actually never fixed let us try to fix it.