shortfuse.org
GitHub Twitter

Build 41! The definitive version

http://www.reddit.com/r/fusionIM/comments/1abx1b/build_39_race_conditions_notifications_ui/ Only MMS, Notifications and 160 character limit left now!

Build 36! SMS fully sync now! READ ME!

http://www.mediafire.com/?9fr9lc5po5blc6h Okay, so now SMS messages sync. If you have a bunch of old messages you don’t care about. Uninstall Fusion and reinstall it. You shouldn’t have to worry about reinstalling the GV app. I’ll submit a warning next build if Fusion couldn’t get the necessary push permissions. So, of course if SMS is syncing this is when we need to worry about duplicates. I do a synchronize lock for outgoing messages you probably won’t ever see duplicates there. Let me know if you ever do. Incoming is a whole other issue. So, Fusion and your stock app will both receive the message and both will write to the android stock database. The “workaround” is make Fusion wait to see if maybe another app will input the same message into the stock database. This is kinda silly. There’s no clean way to do this automatically without making the app slower. That’s NOT an option for me. So, you can disable Fusion from receiving incoming messages. The second your stock app writes the incoming message, Fusion will INSTANTLY resync the database and the message will popup. Of course, if you ever choose to disable/uninstall your default messenger, then turn that option back. The option is enabled by default. I made some crash fixes so it looks like we’re in business now. It’s just MMS and notifications from here on out. After that we’re at feature-complete and I can start reworking code around for better stability and speed (yeah, I said it). I need somebody to make sure you don’t auto crash and then I’ll publish it on the Play Store.

Let’s Build Fusion’s New Icon!

Reddit link below: http://www.reddit.com/r/Android/comments/1a7855/lets_build_fusions_new_icon_psd_files_included

Google Voice can’t delete individual messages…

Seriously, this is crazy. Apparently Google only knows how to work with “conversations”. There is literally no way to delete an individual message. Now I’m not so sure how to implement this. There are two ways. Delete the entire conversation from Google Voice’s servers and keep every other message on your Fusion database. The problem is, if you lose your database (like uninstalling the app), the entire conversation is lost. Leave the conversation on Google Voice’s servers, but flag the MessageID as deleted. This pretty much means that Fusion will ignore the message on every sync, but it’ll still be on Google’s server. Really dumb implementation.

Build 31! Feedback needed!

http://www.mediafire.com/?d5i7bwx347rckq5 I haven’t uploaded it to the Play Store. I need somebody to run it and let me know if it works (aka doesn’t crash on boot). I moved everything to E164 by using libphonenumber. It’s bloated and slow (200kb) but I’ll trim that down later. The database is upgraded on boot (which is why it needs testing). The search function is working as expected now. Clicking the search button will list all your contacts immediately. Loading the first instance of contacts takes a little bit more time, but remember that it’s all cached after the first run though. Dark Action Bar is properly fixed, so no more odd coloring in Android 2.x

Permission Breakdown

Permissions Breakdown: android.permission.ACCESS_NETWORK_STATE: Google Voice Connectivity android.permission.INTERNET: Google Voice Connectivity android.permission.GET_ACCOUNTS: Get Google Account Names android.permission.MANAGE_ACCOUNTS: Create Google Account Prompt android.permission.READ_CONTACTS: Build Contacts List android.permission.READ_PROFILE: Get your profile icon android.permission.RECEIVE_BOOT_COMPLETED: Start on Boot android.permission.RECEIVE_SMS: Receive Text Messages android.permission.SEND_SMS: Send Text Messages android.permission.USE_CREDENTIALS: Get Google Voice OAuth2 credentials (never your password) android.permission.VIBRATE: Vibrate on New Message com.android.vending.BILLING: Future Donations com.google.android.apps.googlevoice.INBOX_NOTIFICATION.permission.C2D_MESSAGE: GV Push Notification com.google.android.apps.googlevoice.permission.RECEIVE_SMS: GV Push Workaround com.google.android.c2dm.permission.RECEIVE: Push Notifications com.google.android.providers.gsf.permission.READ_GSERVICES: Register GV Push Notifications

Changelogs

v0.77: Download MMS v0.76: Vibration, Ringtone and Text Entry options v0.74: QuickReply revamped and customizable. Close-able conversations. v0.71: QuickReply for Android 3.0+ v0.70: Multiview support + theme fixes v0.69: Open and share MMS v0.68: Shows MMS, Navigation Modes and Collapsable Contact Banner v0.65: Crash fixes v0.64: Quick Reply system is complete v0.63: Google Voice stability v0.61: Mark as read is finished. Bug fixes v0.60: New Icon, Quick Reply, Speed fixes v0.55: Rich notifications + CDMA fix for splitting messages. v0.54: Outgoing status fix v0.53: 160 character limit fixed, photos not showing fixed, crash fixes v0.52: Message new contacts, faster loading, fixed crashes and notifications v0.51: Speed improvements v0.49: Number parsing is complete v0.47: Fixed crash if you don’t have a profile icon. v0.46: Hi-res contact icons v0.45: All known bugs fixes. On to UI phase v0.44: Shortcode messaging has been fixed. Only warns about Google Voice if you’re not going to get messages. v0.43: Fixed issue where Fusion would grab the wrong account (usually Dropbox). Fixed crashes on clicking notification. v0.42: Fixed crash on syncing database with blank messages v0.41: Fixed crash on swipe v0.40: Fixed contacts spinner not working properly v0.39: Race conditions, notifications, UI duplication fixes. Warnings added. v0.38: Massive lag fix v0.37: Minor bugfix v0.36: Incoming messages now sync. Lots of bug fixes. v0.35: Fixed search on Android 2.x. Outgoing messages now write to the internal db. v0.34: Search works in conversations. SQL should work multithreaded now. Crash fixes. Search bug fixes. International support improved v0.33: Copy, Delete, & Info options when long pressing messages. Links now open on click. Fixed crash on notification or reopening app. Notifications now take you directly to the conversation. Profile photo is now shown. Search bugfix. v0.31: Clicking search lists everyone. Better phone number parsing and int’l support v0.30: Search auto hides after picking a contact or selecting someone. Fixed Android 2.x crashes and contacts not auto sorting on new message v0.29: Contact search and bug fixes v0.28: Fixed huge bug where messages wouldn’t send. v0.27: Contact icons and small crash fix. v0.26: SQLite database lock crashes. Nearly all reported crashes fixed v0.25: Fixed possible wrong sender and few more crashes (reports actually do help!). Added disable SMS option. v0.24: Removed AsyncTasks. More crash fixes. Added disable notifications option v0.23: Fixed the Play Store’s automatic tablet blocking. Should support any and all devices now.

Sent to Google Play

Theoretical link: https://play.google.com/store/apps/details?id=im.fsn.messenger Reddit Link For those who don’t know, it’s been renamed as Fusion Messenger (or just Fusion)

Split Contacts List (Optional)

A couple of people were asking me for something like SlidingMenu, but it think SlidingMenu can get a bit difficult for some people to use. What I’ve done is created something similar to Google Play’s partial fragment screen. I”m not entirely sure how other people are doing it, but I got it to work pretty reliably without a major hassle with ViewGroups and the like. Let me start off by reiterating that almost all display options on the application are optional. By default, I believe I’ll set the margin between 48dp and 96dp (so… 72dp?). For this example, I’m showing the the Light theme, which is pretty much the same thing as the dark theme, with the opposite Holo colors (instead of holo_blue_light, holo_blue_dark). I’m not sure if it’s as pretty as dark. Maybe it’s the colors or just the fact I prefer black. Maybe it’s the fact, by default Light background doesn’t use a gradient for a background. I’m setting the dp to 144dp to really show off the effect. I’ve written a custom SeekBarPreference and it looks like this: The minimum is 0dp (off), max is 192dp and increments are 8dp. The XML for this preference is written like this: <org.shortfuse.hermes.SeekBarPreference android:defaultValue="0" android:key="pfContactsListRightMargin" android:max="192" android:text="dp" android:title="@string/pfContactsListRightMargin_title" seekBar:increment="8" seekBar:min="0" /> So it’ll pretty easy to make a seekable preference from now on. Here’s how it looks in portrait view. Just remember I’m exaggerating here for effect. Here’s with the option off and in dark: The color on the right hand side of the contact is the “Unread Indicator.” I figure having the number of unread messages seems kind of silly, since regardless, when you flick over, they will be marked red. The color is based on the IM service. Seems silly now for just SMS and GVoice, but when you start adding more services it won’t be as needlessly colorful. I’m not sure if I want to move this to the immediate right of the contacts icon instead all the way on the lefthand, since I don’t like the colors clashing on the right hand side. I just realized I haven’t considered putting the last message time in the contacts list. Oh well, I’ll think of something. Mock ups and suggestions welcome. Edit: Portrait is okay, but totally awesome on landscape. I also moved the color indicator to the other side with gray as no new messages. Check it out: You can manipulate both lists simultaneously. Slide to the right and you’ll see the text entry box like in the other pictures. This means forwarding messages is going to be a lot easier, since you can select/copy messages on the right and hold and “paste & send” to the contacts on the left. You just slide to the right to get to your edit box. And finally you’ll reach your normal messaging window:

SQL Update

Just going to post the new changes I did because Sender/Recipient is redundant with IsIncoming. I changed it to use ExternalAddress and indexed it. private static final String DATABASE_CREATE = "CREATE TABLE Messages " + "(" + "MessageID INTEGER PRIMARY KEY AUTOINCREMENT, " + "ProviderID INTEGER NOT NULL, " + "MessageStatusID UNSIGNED INTEGER NOT NULL, " + "IsIncoming BIT NOT NULL, " + "InternalAddress NVARCHAR(128) NULL, " + "ExternalAddress VARCHAR(128) NOT NULL, " + "CreationDateTime DATETIME NOT NULL, " + "LastSendAttemptDateTime DATETIME NULL, " + "CompletionDateTime DATETIME NULL, " + "MessageText TEXT NOT NULL, " + "ExtraData BLOB NULL, " + "ExtraDataTypeID UNSIGNED INTEGER NULL, " + "ImportMessageID NVARCHAR(40) NULL, " + "ImportConversationID NVARCHAR(40) NULL, " + "IsRead BIT NOT NULL" + ")"; private static final String DATABASE_INDEXES_CREATE = "CREATE INDEX IX_ProviderID_ExternalAddress_CreationDateTime ON MESSAGES " + "(" + "ProviderID ASC, " + "ExternalAddress ASC," + "CreationDateTime ASC" + ")"; String rawQuery = "" + "SELECT " + " M2.MessageID, " + " M2.ProviderID, " + " M2.MessageStatusID, " + " M2.IsIncoming, " + " M2.InternalAddress, " + " M2.ExternalAddress, " + " M2.CreationDateTime, " + " M2.LastSendAttemptDateTime, " + " M2.CompletionDateTime, " + " M2.MessageText, " + " M2.ExtraData, " + " M2.ExtraDataTypeID, " + " M2.ImportMessageID, " + " M2.ImportConversationID, " + " M2.IsRead, " + " LastMessageData.ProviderID, " + " LastMessageData.ExternalAddress " + "FROM " + " ( " + " SELECT " + " M1.ProviderID, " + " M1.ExternalAddress, " + " MAX(CreationDateTime) [LastMessageTime] " + " FROM " + " Messages M1 " + " GROUP BY " + " M1.ProviderID, " + " M1.ExternalAddress " + " ) AS LastMessageData " + " LEFT JOIN Messages M2 ON " + " M2.CreationDateTime = LastMessageData.LastMessageTime " + " AND M2.ExternalAddress = LastMessageData.ExternalAddress " + " AND M2.ProviderID = LastMessageData.ProviderID " + "ORDER BY " + " LastMessageData.ProviderID, " + " LastMessageData.ExternalAddress, " + " M2.MessageID"; I don’t think there’s any theoretical way to make this faster. You’re all welcome to try, and I’ll patch it in.