ushahidi / Ushahidi_Android

[Deprecated] Ushahidi Android app For Ushahidi V2.x.x. Working on V3.x.x at
https://github.com/ushahidi/platform-android/
GNU Lesser General Public License v3.0
202 stars 153 forks source link

Open GeoSMS support #92

Closed ghost closed 11 years ago

ghost commented 11 years ago

Summary

eyedol commented 11 years ago

@mrl-gt You're missing the Open GeoSMS classes for the database package. Specifically, OpenGeoSmsDao, IOpenGeoSmsSchema and IOpenGeoSMSDao. This has broken my develop branch.

ghost commented 11 years ago

@eyedol Could you explain a bit more? Do you mean OpenGeoSmsDao.java, IOpenGeoSmsSchema.java, and IOpenGeoSmsDao.java are missing? Also do you mean that https://github.com/ushahidi/Ushahidi_Android/commit/e22e764e66d7134b8dc7e27f568e8da427e29554 failed to build? I checked out this commit and didn't encounter any build problems.

eyedol commented 11 years ago

I mean I don't have those files. Look inside your com.ushahidi.andriod.app.database package. Those files are not in the repo. Double check if you pushed them.

ghost commented 11 years ago

@eyedol They seem to be available in both our repos?

in your develop branch: https://github.com/ushahidi/Ushahidi_Android/blob/develop/Core/src/com/ushahidi/android/app/database/IOpenGeoSmsDao.java https://github.com/ushahidi/Ushahidi_Android/blob/develop/Core/src/com/ushahidi/android/app/database/IOpenGeoSmsSchema.java https://github.com/ushahidi/Ushahidi_Android/blob/develop/Core/src/com/ushahidi/android/app/database/OpenGeoSmsDao.java

in my repo's ogs_dev branch: https://github.com/mrl-gt/Ushahidi_Android/blob/ogs_dev/Core/src/com/ushahidi/android/app/database/IOpenGeoSmsSchema.java https://github.com/mrl-gt/Ushahidi_Android/blob/ogs_dev/Core/src/com/ushahidi/android/app/database/IOpenGeoSmsSchema.java https://github.com/mrl-gt/Ushahidi_Android/blob/ogs_dev/Core/src/com/ushahidi/android/app/database/OpenGeoSmsDao.java

They're added in this commit https://github.com/ushahidi/Ushahidi_Android/commit/db2b31093ea25018b6dd67f2eb0c64098480a68b

eyedol commented 11 years ago

Ah I think I know why. I'll have to refresh eclipse so it loads the files. I'll double check when I get on my machine.

eyedol commented 11 years ago

@mrl-gt Okay refreshing eclipse resolved the issue. My bad.

ghost commented 11 years ago

@eyedol Glad to know the issue is resolved. Please let me know if my changes introduced other issues.

eyedol commented 11 years ago

@mrl-gt I managed to try to get your feature working with my opengeosms setup on my local ushahidi install. It detects that opengeosms plugin is installed on Ushahidi and provides the option to select either internet or opengeosms. When I select internet, the upload report works without problem but it fails to upload the report when opengeosms is selected.

On the ushahidi side, I have smssync enabled as the sms gateway and have it configured to receive sms but for some reason, uploading reports via goesms doesn't go through.

Note: I modified your pull request to fix an issue with report upload via internet. It simply didn't work for me. You might want to review that to see if it affected the geosms implementation. See 7b58ffac9a

ghost commented 11 years ago

@eyedol I'd like to verify your setup so I can reproduce this. Is the following correct? Android 1 (Ushahidi_Android) --(SMS)--> Android 2 (SMSSync) --(http)--> Ushahidi(with SmsSync plugin) If so, I'd like to verify where did the message stop to propagate. Did Android 2 receive the SMS?

Also think the 1st change after if (mIsReportEditable) might cause photo upload to fail. I will test and let you know.

eyedol commented 11 years ago

@mrl-gt -- Android 1 (Ushahidi_Android) --(SMS)--> Android 2 (SMSSync) --(http)--> Ushahidi(with SmsSync plugin). Yes, correct that is the setup I currently have.

Android 2 didn't receive the message. On Android 1, the message failed to be sent and got stuck in the pending report section of the list.

ghost commented 11 years ago

@eyedol I checked out that commit and also the current release branch to test, and can send SMS without problems. Could you help to verify some questions:

thanks a lot

also, about the changes in 7b58ffa: https://github.com/ushahidi/Ushahidi_Android/commit/7b58ffac9a#commitcomment-2107179

ghost commented 11 years ago

@eyedol I added some debug code to OpenGeoSMSSender to assist tracking down the SMS issue in this commit: https://github.com/mrl-gt/Ushahidi_Android/commit/ca84d538920c1c8519fac79f2382d256eff4621d

eyedol commented 11 years ago

@mrl-gt So I just tested again using two emulators. One running SMSSync and another running the Ushahidi Android app. It worked. My guess with the failure I encountered earl, probably has to do with the phone that had Ushahidi Android app installed on, not having enough airtime to send the SMS.

You might want to rollback this commit mrl-gt/Ushahidi_Android@ca84d53. Also changing to this code doesn't cause any issue onClick(mDlgSendMethod, 1);