Coder Social home page Coder Social logo

ushahidi / ushahidi_android Goto Github PK

View Code? Open in Web Editor NEW
202.0 31.0 153.0 32.48 MB

[Deprecated] Ushahidi Android app For Ushahidi V2.x.x. Working on V3.x.x at

Home Page: https://github.com/ushahidi/platform-android/

License: GNU Lesser General Public License v3.0

Java 99.39% Python 0.54% Shell 0.07%

ushahidi_android's Introduction

[Deprecated] Ushahidi Android app For Ushahidi V2.x.x

Ushahidi Android app For Ushahidi V2.x.x is not compatible with V3.x.x. The source code for the mobile app that works with V3+ is at https://github.com/ushahidi/platform-mobile-app

Ushahidi is an open source platform for democratizing information, increasing transparency and lowering the barriers for individuals to share their stories.

The Ushahidi Android app synchronizes with any Ushahidi deployment allowing viewing and creation of incident reports on the go.

The app supports loading of multiple deployments at one time, quick filtering through reports, exploring incident locations on the map, viewing report photos, news article, media as well as sharing reports via email, SMS or Twitter. Once the data has been downloaded, the app can function without an internet connection, allowing accurate collection of data utilizing the device's camera and GPS capabilities.

For more information visit:

Deprecation Notice

We are channeling all energies into developing the new Android client built on top of v3 APIs. We will still accept PR and will publish a release once we get a couple of PRs for fixes and features from the community.

How To White-Label The App

Duplicate the /Themes/Ushahidi folder and rename with your theme name, for example /Themes/MyTheme. Note, you can use /Beijing or /Inherity themes as an example.

Application Icon

Replace the files "/Themes/MyTheme/res/drawable-hdpi/icon.png" (72 x 72), "/Themes/MyTheme/res/drawable-ldpi/icon.png" (36px x 36px) and "/Themes/MyTheme/res/drawable-mdpi/icon.png"(48px x 48px) with your custom designed application icon. You can use this (launcher icon generator)[http://android-ui-utils.googlecode.com/hg/asset-studio/dist/icons-launcher.html] tool to generate a launcher Icon.

Splash Screen

Replace the file "/Themes/MyTheme/res/drawable/splash.png" with your custom designed splash image. It should be of the size 320px x 480px

About Background

Replace the file "/Themes/MyTheme/res/drawable/about.png" (320px x 440px) with your custom about background image.

Deployment Logo

Replace the file "/Themes/MyTheme/res/drawable/logo.png" (260px x 68px) with your deployment logo.

Notification Image

Replace the file "/Themes/MyTheme/res/drawable/notification.png" (21px x 21px) with your custom notification image.

Report Placeholder

Replace the file "/Themes/MyTheme/res/drawable/report.png" (50px x 50px) with your placeholder if report images

Color Codes

In the "/Themes/MyTheme/res/values/theme.xml", replace the various hexadecimal color codes with your own colors that match your deployment, for example #edd5c9

Deployment Information

In the "/Themes/MyTheme/res/values/theme.xml", specify the app_title and also various URLs for your deployment:

  • deployment_url
  • team_url
  • media_url
  • twitter_url
  • facebook_url
  • contact_url

Note:, if you do not have a Facebook or Twitter account, leaving these values blank will hide these About screen buttons.

Deployment Text

In the "/Themes/MyTheme/res/values/theme.xml", update the about_text with a description of your deployment.

How To Build The App

To build any of the white-labled app, read the wiki entry.

ushahidi_android's People

Contributors

dalezak avatar eyedol avatar inoran avatar ospar0829 avatar pdmholden avatar rszotak avatar tuxpiper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ushahidi_android's Issues

Commenting

Add commenting to checkins and reports

About page

When opening "About" from the map or the main screen, pressing back first
reloads the About screen, then it returns to the map on a second press and
stops there.

Report upload failed ....

Everytime by Upload shows up following toasts:

  1. Saved
  2. Uploading
  3. Failed

That error message is in ReportFragment.java R.string.failed

Network Error

Bug Report By: Andrew Riley
Priority: NORMAL

Description:
When I manually sync (haven't tried auto-sync yet) I receive the error "Network error, please ensure you are connected to the net." The sync looks like it is processing in the background (the progress bar slides across the screen and my count X/100 increments).

When I then click on "list incidents" it is blank.

I have tried restarting the app multiple times but the error pops up every time I try to sync.

I'm on a T-Mobile (US) G1, Firmware 1.5, Kernel 2.6.27-00393-g6607056 san@sandroid #1, Build CRC1

My network connection at the time of testing is Edge with a relatively good signal.

Upgrade db schema

The DB schema has changed hugely. Implement an upgrader to update the old db schema to the new one.

Connectivity with crowdmap issue

Whenever I try to add a new report on Ushahidi Android app, I get the toast:

Failed to Send Report. Check to see if you filled all required fields.

I have filled all the required fields though, and it seems like it is serverside... debugging it gives

extractPayLoadJSON(): New 003

which I believe indicates a serverside issue... Is there a setting I need to activate on my crowdmap site? Is there some other issue? I am running a newly downloaded Ushahidi Android app on Ideos u8150 on Safaricom in Kenya to interface with crowdmap. Also, not sure if I should be posting here or on ushahidi forums-- sorry if this is the wrong place...

Country Select

Because there are so many countries, is it possible to have the same type of select that's available in the Android Contacts, where one can quickly scroll to an alphabetic letter? Currently scrolling down to countries like the US takes some work.

Disable auto geolocation in report form

Currently, when the user selects a new location in the map, or if the location in the map is updated for any other reason (see bug# 2400), the text in the "location" field is replaced with the geocoded address, this presents two issues:

  1. Outside of some countries, the geocoding is very inaccurate
  2. The user may choose to use this field to specify details about the location that cannot be detected by the geocoder, or even the GPS (ie. "5th floor")

Suggestion:
Only use geocoding once (ie. when first entering the new report screen), or allow the user to disable it altogether in settings.

Thank you,

Pablo

Force closing after sending successful checkin

I am getting a consistent FC with Ushahidi 2.9.4 interacting with a CrowdMap deployment using checkins. The checkin sends fine, but when app goes to clearFields, it seems like clearing the image file (which was never loaded in the first place) causes the FC?

05-13 13:15:19.245: E/AndroidRuntime(6208): FATAL EXCEPTION: main
05-13 13:15:19.245: E/AndroidRuntime(6208): java.lang.NullPointerException
05-13 13:15:19.245: E/AndroidRuntime(6208):     at java.io.File.fixSlashes(File.java:234)
05-13 13:15:19.245: E/AndroidRuntime(6208):     at java.io.File.init(File.java:201)
05-13 13:15:19.245: E/AndroidRuntime(6208):     at java.io.File.<init>(File.java:152)
05-13 13:15:19.245: E/AndroidRuntime(6208):     at com.ushahidi.android.app.checkin.CheckinActivity.clearFields(CheckinActivity.java:318)
05-13 13:15:19.245: E/AndroidRuntime(6208):     at com.ushahidi.android.app.checkin.CheckinActivity.access$6(CheckinActivity.java:315)
05-13 13:15:19.245: E/AndroidRuntime(6208):     at com.ushahidi.android.app.checkin.CheckinActivity$1.run(CheckinActivity.java:584)
05-13 13:15:19.245: E/AndroidRuntime(6208):     at android.os.Handler.handleCallback(Handler.java:587)
05-13 13:15:19.245: E/AndroidRuntime(6208):     at android.os.Handler.dispatchMessage(Handler.java:92)
05-13 13:15:19.245: E/AndroidRuntime(6208):     at android.os.Looper.loop(Looper.java:123)
05-13 13:15:19.245: E/AndroidRuntime(6208):     at android.app.ActivityThread.main(ActivityThread.java:4627)
05-13 13:15:19.245: E/AndroidRuntime(6208):     at java.lang.reflect.Method.invokeNative(Native Method)
05-13 13:15:19.245: E/AndroidRuntime(6208):     at java.lang.reflect.Method.invoke(Method.java:521)
05-13 13:15:19.245: E/AndroidRuntime(6208):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-13 13:15:19.245: E/AndroidRuntime(6208):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-13 13:15:19.245: E/AndroidRuntime(6208):     at dalvik.system.NativeStart.main(Native Method)

Nullpointer when checkin is doing a file upload

java.lang.NullPointerException
at com.ushahidi.android.app.checkin.NetworkServices.PostFileUpload(NetworkServices.java:81)
at com.ushahidi.android.app.checkin.NetworkServices.postToOnline(NetworkServices.java:56)
at com.ushahidi.android.app.checkin.CheckinActivity$10.run(CheckinActivity.java:627)

Filter reports

Add a search bar at the report listing screen to allow filtering by title

Categories don't recognise hierarchy

If you have implemented a nested hierarchy on Ushahidi web, the Android Ushahidi application does not recognise this hierarchy. Additionally, it renders the top level title, after its children. E.g. if you have a top level Cat 1, that has two children Cat 1A and Cat 1B, then the order they appear in the Android app is: Cat 1A, Cat 1B, Cat 1. Two things should really happen.

  1. The list should be order in the correct order, in this example Cat 1, Cat 1A, Cat 1B. Looking at the data returned via apl?task=categories, the Android app appears to be rendering the category list in the reverse order.
  2. It would be visually useful to see children titles indented from the parent above, so as to clearly identify the parent-children relationship.

Port Code

Port the existing code to the new MVC like framework and make the app tablet friendly.

Starting activity com.ushahidi.android.app.SplashScreen crashed

When you start an example of this app you get this error:
E/AndroidRuntime(652): java.lang.RuntimeException: Unable to instantiate application com.ushahidi.android.app.MainApplication: java.lang.ClassNotFoundException: com.ushahidi.android.app.MainApplication in loader

Resource Not Found Exception is thrown when going to about page

Tracetrack is here

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ushahidi.android.app/com.ushahidi.android.app.About}: android.content.res.Resources$NotFoundException: String resource ID #0x7f0700d4
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3691)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x7f0700d4
at android.content.res.Resources.getText(Resources.java:221)
at android.content.res.Resources.getString(Resources.java:274)
at android.content.Context.getString(Context.java:183)
at com.ushahidi.android.app.About.onCreate(About.java:55)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)

back button doesn't work as expected

Here's what I do:

  1. Upload a new report and hit send
  2. I get a confirmation that the report was sent successfully
  3. I'm then taken back to the list of reports.
  4. I hit back
  5. I'm taken back to the report upload form. I expect to be taken back to the list of Ushahidi deployments. If I press back again, I go to the list of reports, and if I press back a 3rd time I'm finally taken back to the list of Ushahidi deployments.

Thanks.

Ability to cancel report in progress

Cannot cancel report in progress. If <- from report screen, and then go back, old values still there. Same after killing the application, or even rebooting the device.

HTC Desire/CM7.0/Ushahidi2.9.1

Force close empty Report add

When the some required text fields are empty, then force close error message comes up.

There should be Title is empty or Description or Category is empty popup error messages show up, when some required text fields are empty.

Offline draft reports are not uploading photos

I have just been testing the offline functionality. I have found that when a photo is taken when in an offline state, that the photo is not uploaded to the Ushahidi server once sync occurs back in network coverage/wifi.

To reproduce:

  1. Disable wifi/mobile data on the phone.
  2. Create a report (at this point a draft is saved).
  3. Add a photo (afterwards the draft is saved again).
  4. Send the report.
  5. Enable wifi/mobile data on the phone.
  6. Sync.

Result:
The report is uploaded to the Ushahidi server correctly, but the photo has not been uploaded.

Style the tab at the split view

At the moment, the tab on the split view is white and doesn't blend so well with the rest of the views. Style this with glossy black or something

Port Deployment Search to new code base

Move all the codes in the deployment search related classes to the new code base. Rename deployment now to maps so to maintain consistency across both the iPhone and Android apps.

Investigate the cause of this issue

02-13 07:18:07.717: E/AndroidRuntime(565): Caused by: java.lang.NullPointerException
02-13 07:18:07.717: E/AndroidRuntime(565): at com.ushahidi.android.app.data.Database$DatabaseHelper.onCreate(Database.java:309)
02-13 07:18:07.717: E/AndroidRuntime(565): at com.ushahidi.android.app.data.Database$DatabaseHelper.onUpgrade(Database.java:398)
02-13 07:18:07.717: E/AndroidRuntime(565): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:162)
02-13 07:18:07.717: E/AndroidRuntime(565): at com.ushahidi.android.app.data.Database.open(Database.java:448)
02-13 07:18:07.717: E/AndroidRuntime(565): at com.ushahidi.android.app.MainApplication.onCreate(MainApplication.java:52)
02-13 07:18:07.717: E/AndroidRuntime(565): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:968)
02-13 07:18:07.717: E/AndroidRuntime(565): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3696)
02-13 07:18:07.717: E/AndroidRuntime(565): ... 10 more

Not responding

I tried submitting a report, but the app seems to freeze up when I click
Send, I get the "not responding" popup, and then when I click "wait" the
Ushahidi app puts up a toast saying that it couldn't get network access.

NullPointerException is thrown when clearing cached deployments

java.lang.NullPointerException
at java.io.File.fixSlashes(File.java:205)
at java.io.File.init(File.java:189)
at java.io.File.(File.java:139)
at com.ushahidi.android.app.DeploymentSearch.clearCachedReports(DeploymentSearch.java:464)
at com.ushahidi.android.app.DeploymentSearch$ReportsTask.onPostExecute(DeploymentSearch.java:647)
at com.ushahidi.android.app.DeploymentSearch$ReportsTask.onPostExecute(DeploymentSearch.java:1)
at android.os.AsyncTask.finish(AsyncTask.java:417)
at android.os.AsyncTask.access$300(AsyncTask.java:127)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:429)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3691)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
at dalvik.system.NativeStart.main(Native Method)

Reports created offline aren't synced to Crowdmap when connectivity is available

The reports you create when internet connection isn't immediately available are supposedly synced to your Crowdmap deployment when the connectivity becomes available again.
It seems this isn't currently working on my Ushahidi Android app.

Here are the steps I follow:

  • have a Crowdmap deployment already set in the Ushahidi app
  • turn on GPS (and wait some time)
  • turn off WIFI (I didn't test this on 3G yet)
  • start the Ushahidi app
  • add a report including Title, Description, Category, automatic geolocation
  • press the Send button (you are notified the report has been saved to local storage, and you're told to sync to the online instance when connectivity will be available again)
  • minimize/close the app and enable WIFI
  • start the Ushahidi app
  • press the Sync button and wait until "all reports have been fetched" shows up

What happens:
No reports show up in the moderation queue at my Crowdmap deployment.

Notes:
when the internet connection comes back and I run the Ushahidi app so that it syncs and sends the report, sometimes the app just crashes. Sometimes it doesn't crash, but the report just doesn't show up anyway in Crowdmap.

This happens with Ushahidi 2.9.4.
I use a Nexus S with Android 4.0.3 (official ICS update, manually installed).

2.9.3 does not collect reports or show map

Initial tests of release 2.9.3 do not show reports or map info. Looking at the server logs I do not see the device making any requests. What is the last known working version?

Remove Advance Settings

The current advance settings has a lot of options that are hardly used by users and some of them don't work and not need. Remove the entire advance settings.

Edit Existing Map

Add the ability to allow users to edit an existing map aka deployment. At the moment, you can only add but cannot edit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.