19
Nov 09
A new version of Wootsi has been published along with an ad-supported lite version. You can grab either of these from the Android Market.
Version 2.0 contains some bug fixes along with independently updating items. Also, you can now view items while the application is updating.
Go check it out on the Android Market. Click this link from your android phone to go directly to the app: market://search?q=wootsi
Android / Development / Java — 6 comments
18
Sep 09
So a new Android SDK came out a couple days ago. I tried opening up a trace file, but traceview complained that the swt version was not 64-bit compatible. I Googled around for a bit and found a semi-convoluted solution that worked for the 1.5 SDK. Here’s my simplified solution for 1.6.
Download and upzip the file below into “/tools/lib/” in your 1.6 SDK folder. That should do it.
SWT Fix (327)
Android / Development / Java — 3 comments
21
Aug 09
I recently pushed an update to my latest Android app, Wootsi.
Wootsi goes out to woot.com and four other woot.com sub-sites to grab their “daily deal”. The app gives users an advantage to those who don’t, because they can receive periodic updates at times they choose. I have my preferences set to update every three hours starting at 7:15 AM.
Another feature is “woot off” detection, which will fetch updates at a faster rate while a woot off is happening.
The first version of the app had some major bugs, but this update fixes them and adds some new features.
Search for Wootsi on your Android phone to find out more.
Android / Development / Java — 3 comments
08
Jul 09
Let’s say I have a table called “Contacts”. I’d like to search that table for the string “michael pardo”, however, I could pass in the string “pardo michael” instead. I’d like it to work either way, so here’s what I think the query should look like:
1
2
3
4
5
6
7
8
9
10
11
12
| SELECT *
FROM Contacts
WHERE
(
FirstName LIKE '%michael%'
OR LastName LIKE '%michael%'
)
AND
(
FirstName LIKE '%pardo%'
OR LastName LIKE '%pardo%'
) |
Okay, well how do I enclose those condition expressions with SubSonic? We can take advantage of the Expression syntax to make this work. Here’s the SubSonic code, broken up by query parts.
1
2
3
4
5
6
7
8
9
10
11
12
| // SELECT * FROM Contacts
var q = new Select().From<Contact>();
// WHERE (FirstName LIKE '%michael%' OR LastName LIKE '%michael%')
q.WhereExpression(Contact.Columns.FirstName).Like("%michael%");
q.Or(Contact.Columns.LastName).Like("%michael%");
// AND (FirstName LIKE '%pardo%' OR LastName LIKE '%pardo%')
q.AndExpression(Contact.Columns.FirstName).Like("%pardo%");
q.Or(Contact.Columns.LastName).Like("%pardo%");
q.ExecuteTypedList<Contact>(); |
One problem I encountered with this method was with chaining. If I chain the “or” commands instead of calling them separately, SubSonic will short-change you on the constraints it passes in. Some sort of bug (or feature) maybe.
.Net / Development / SubSonic — 3 comments