Fix an issue (hard) OpenIntents
Status: Closed Time to complete: 336 hrs Mentors: Peli, Friedger Müffke, Randy McEoin, aap, Manuel R. Ciosici Tags: Android, Java

The task is to fix one of the issues from the list of issues.

Your solution should consist of a patch (instructions) based on the latest version of the application. If you dont have it yet, you first need to download and install the Android SDK (instructions). Follow these instructions to build OI applications.

  • Difficulty: hard
  • Time limit: 14 days
  • Prerequisites: Download the Android SDK (instructions)
  • Requirements for completed entry:
    • IMPORTANT: Ask first whether the issue you want to work on is still available and whether you should choose an easy, medium, or hard task.
    • Send in a patch with your code modifications (instructions).
    • The code must follow our StyleGuide.
    • The code must fix the issue.
    • Depending on the number of stars of the issue, select an easy (1 star), medium (2 stars), or hard (3 or more stars) task.
Uploaded Work
File name/URL File size Date submitted
barcode.diff 3.7 KB December 11 2011 13:41 UTC
barcodetest.diff 3.9 KB December 11 2011 13:41 UTC
barcodetest.2.diff 4.4 KB December 11 2011 13:54 UTC
barcode.3.diff 15.4 KB December 11 2011 15:41 UTC
barcode.4.diff 15.4 KB December 11 2011 19:23 UTC
barcode.5.diff 15.5 KB December 12 2011 11:26 UTC
Comments
Task Claimed by Shuhao Wu November 22 2011 21:52 UTC

I would like to work on this task.

Claim Removed by Shuhao Wu November 22 2011 22:37 UTC

The claim on this task has been removed, someone else can claim it now.

Task Claimed by Shuhao Wu November 25 2011 18:47 UTC

I would like to work on this task.

Issue claim by Shuhao Wu November 25 2011 19:05 UTC

I would like to work on this issue.
http://code.google.com/p/openintents/issues/detail?id=187

I have a question, where's the list populating code? I can't seems to find it.

Sorting by Shuhao Wu November 25 2011 19:14 UTC

Is the sorting done via the database? I see Cursor c = qb.query(db, projection, selection, selectionArgs, null, null, orderBy); in NotePadProvider.java @ line 176

If so, is the date of modification and date of creation also encrypted in the database? Or is it just the tags, the title, and the content? (If the ladder, I will only need to order it for alphabetical and reverse alphabetical)

Task Assigned by Randy McEoin November 25 2011 20:30 UTC

This task has been assigned to Shuhao. You have 336 hours to complete this task, good luck!

Sorting by Randy McEoin November 25 2011 20:40 UTC

I looked around and it does appear like you're saying, only the tags, title, content are encrypted. Not 100% sure where the sorting happens. Certainly at the database level a sort happens. If that's the only place it happens, then you'll have to find another location to perform it, since the database never gets to see the clear-text version of the title. If you still have a tough time finding a good spot to sort, post in the Google Group.

Reindent patch by Shuhao Wu November 25 2011 22:33 UTC

I'll refrain from working on it until my white space patch has been accepted.
https://groups.google.com/forum/#!topic/openintents/wtKu5rj2do0

White space by Peli November 26 2011 14:43 UTC

You've probably seen it already, but the white space patch has been applied here:


http://code.google.com/p/openintents/source/detail?r=3762

Claim Removed by Shuhao Wu December 1 2011 20:56 UTC

The claim on this task has been removed, someone else can claim it now.

Task Claimed by Gautam December 9 2011 01:24 UTC

I would like to work on this task.

. by Gautam December 9 2011 01:25 UTC

http://code.google.com/p/openintents/issues/detail?id=358 :)

. by Gautam December 9 2011 14:32 UTC

Sir, could you please accept my claim? Thanks! :)

Claim Removed by Gautam December 10 2011 13:35 UTC

The claim on this task has been removed, someone else can claim it now.

Sorry by Peli December 10 2011 17:36 UTC

Sorry for the delay. Are you still interested?


(Please provide clickable links, so that tasks can be accepted faster).

Yes by Gautam December 10 2011 17:40 UTC

Yes, I'd still like to take this task and fix this issue http://code.google.com/p/openintents/issues/detail?id=358 Is it okay? :)

Yes by Peli December 11 2011 12:20 UTC

Yes, it is still open, so claim it.


Note that for a hard task of this kind, we will expect you to provide the corresponding test cases.

Task Claimed by Gautam December 11 2011 12:24 UTC

I would like to work on this task.

. by Gautam December 11 2011 12:35 UTC

Can you please accept it right now? I have the patch ready. :)

Note by Gautam December 11 2011 13:09 UTC

I have the test case working, but for just one part which isn't supported by Robotium. At the end, it presses the Add button (when the barcode scanner option is on) and tries to assert that "Complete action using" option is shown, but that is not possible since I guess that's a different activity.

Task Assigned by Peli December 11 2011 13:40 UTC

This task has been assigned to Gautam. You have 336 hours to complete this task, good luck!

Ready for review by Gautam December 11 2011 13:41 UTC

The work on this task is ready to be reviewed.

Ok by Peli December 11 2011 13:44 UTC

So just do in your test case what is possible, and write in a comment what can not be tested.


Do you cover the following?


* Short click and long click with the option enabled or disabled


* Make sure the setting is applied immediately after you return from settings?


 

. by Gautam December 11 2011 13:46 UTC

1. I'll add for short click.


2. Yes.

. by Gautam December 11 2011 13:55 UTC

Uploaded the new test patch.

Comments by Peli December 11 2011 14:11 UTC

* Please precede any "Log.v" by "if (debug)".


* "Starts a barcode scanner when you long press the Add button. Barcode OI Plugin must be installed."


could be shortened slightly to:


"Long press the Add button to start a barcode scanner. Requires Barcode OI Plugin."


or


"Long press the Add button to start Barcode OI Plugin (if installed)."


Would this fit into two lines?


* Also, please provide a single patch file for both (shoppinglist and test) which is based on the trunk, so that it is easier to apply :-)


(* Would it be easily possible to open the "GetFromMarket" dialog linking to the plugin at Market and at the OI homepage so that users are directed there if not installed yet? (either when turning on the setting or when long-pressing the add button?))

Task Needs More Work by Peli December 11 2011 14:11 UTC

One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.

. by Gautam December 11 2011 15:02 UTC

Can you give me an example for GetFromMarket? Thanks. :)

Ready for review by Gautam December 11 2011 15:41 UTC

The work on this task is ready to be reviewed.

Patch updated by Gautam December 11 2011 15:42 UTC

Did all the changes as requested. :)

Claim Removed by Gautam December 11 2011 16:56 UTC

The claim on this task has been removed, someone else can claim it now.

Task Claimed by Gautam December 11 2011 16:59 UTC

I would like to work on this task.

. by Gautam December 11 2011 16:59 UTC

Sorry for the temporary unclaim, had to get the points of this task - http://www.google-melange.com/gci/task/view/google/gci2011/7127316 Wouldn't happen again now. :)

Task Assigned by Peli December 11 2011 18:37 UTC

This task has been assigned to Gautam. You have 336 hours to complete this task, good luck!

Ready for review by Gautam December 11 2011 19:05 UTC

The work on this task is ready to be reviewed.

Looks good by Peli December 11 2011 19:14 UTC

This looks very good! Following comment:


* In your test, you scroll down and press the second check box. This is very likely to fail on different screen sizes or if other settings are introduced. Is it possible to refer to the string of the check box?


 

Task Needs More Work by Peli December 11 2011 19:14 UTC

One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.

. by Gautam December 11 2011 19:15 UTC

Sorry, but I really don't think that Robotium supports that..?

Ready for review by Gautam December 11 2011 19:23 UTC

The work on this task is ready to be reviewed.

. by Gautam December 11 2011 19:24 UTC

Ok, I just thought of a workaround. It checks if the checkbox with the text "Barcode Scanner" is checked or not and then clicks on the text (which unchecks or checks the checkbox). Hope that would do. :)

New Patch by Gautam December 11 2011 19:40 UTC

Have uploaded the new patch - .4.diff. Could I please have you GTalk id or can OpenIntents start an IRC channel? That would really help a lot in communication. Looking forward to do more OI tasks. :)

Test still fails by Peli December 11 2011 23:44 UTC

Strangely the test still fails for me:


* solo.isCheckBoxChecked("Barcode Scanner") does not seem to work and always returns "false"?


* The test stops at this line: solo.assertCurrentActivity("Expected ShoppingActivity activity", "ShoppingActivity");


I don't know what I may be doing wrong - maybe I'm just too tired... I hope some other mentor can have a look at this task in the mean-time.


Except for the test, everything else works well :-)

isCheckBoxChecked by Randy McEoin December 12 2011 02:28 UTC

I get the same situation where  solo.isCheckBoxChecked("Barcode Scanner") always returns false.


Somebody else has had issues with isCheckBoxChecked()


http://code.google.com/p/robotium/issues/detail?id=106


Something may have to change in the main ShoppingList in order for the test to find the checkbox.

.6.diff by Gautam December 12 2011 11:29 UTC

I know it's not entirely correct to do this, but I've shifted up the Barcode Scanner option so that it is likely displayed without the need of scrolling. No other thing worked for me (the previous patches were working, but they suddenly stopped working for me too, I don't know why).

. by Gautam December 13 2011 13:59 UTC

Could the task be reviewed asap? Thanks!

Uploaded by Peli December 13 2011 22:32 UTC

Uploaded in revision 3862.


 

Task Closed by Peli December 13 2011 22:32 UTC

Congratulations, this task has been completed successfully.