Friday, August 27, 2010

Closing an activity by touching outside

I have been working on an application that I want to close an Activity when the user touches outside the activity. Like how you can set the setCanceledOnTouchOutside(boolean cancel) in the android.app.Dialog. The activity I want to close is themed like a dialog so there is an area around the activity that is not “active”.

I was able to achieve the desired effect by overriding the activity’s onTouchEvent(MotionEvent event). This method is called when a screen touch event is not handled by any views.

@Override
public boolean onTouchEvent ( MotionEvent event ) {
// I only care if the event is an UP action
if ( event.getAction () == MotionEvent.ACTION_UP ) {
// create a rect for storing the window rect
Rect r = new Rect ( 0, 0, 0, 0 );
// retrieve the windows rect
this.getWindow ().getDecorView ().getHitRect ( r );
// check if the event position is inside the window rect
boolean intersects = r.contains ( (int) event.getX (), (int) event.getY () );
// if the event is not inside then we can close the activity
if ( !intersects ) {
// close the activity
this.finish ();
// notify that we consumed this event
return true;
}
}
// let the system handle the event
return super.onTouchEvent ( event );
}

Now with that code in place, if the user touches anywhere outside of the dialog style activity, it will close.


Monday, August 23, 2010

SMS Backup

screenshot SMS Backup was always one of the first applications I had to install on my device if I had to wipe it clean. SMS Backup is released under the Apache License, Version 2.0 and developed by Christoph Studer. Development has pretty much been stale on this application for the past year.

That is where SMS Backup+ comes in. It is an improved version of SMS Backup, also released under the Apache License, Version 2.0 and developed by Jan Berkel. Some of the main differences are:

  • XOAuth support – Uses XOAuth to authenticate with Gmail, instead of you supplying your username and password
  • Faster – Does not base64 encode the emails before transferring
  • IMAP support – Doesn’t just work with Gmail (but defaults to Gmail), it works with any IMAP server
  • Restore – You can transfer sms messages back from email to the device.
  • MMS Not Yet Supported, but planned

This is one of the applications I like to place in the Ron Popeil category, because you can “set it, and forget it”.

You can install from the Android Market for free:

Sunday, August 22, 2010

Droid Explorer 0.8.7.2

explorer A new release of Droid Explorer was published early today. It fixes the big issue with the server not being able to start. It also has some little fixes that wont even be noticed by most people. For example the extended glass area now doesn’t cause the window to move in an unexpected ways.

I will now be starting to work heavily on the 0.9.x branch. This will open Droid Explorer to many more devices beyond the rooted with busybox devices.

If you have any issues with 0.8.7.2 please report them on the droid explorer project issue tracker so they can be addressed.

Downloads

Application DroidExplorer.0.8.7.2.x86.Setup – 14974K
Application DroidExplorer.0.8.7.2.x64.Setup – 15142K
Application DroidExplorer.0.8.7.2.x86.Standalone – 32911K
Application DroidExplorer.0.8.7.2.x64.Standalone - 33078K

Wednesday, August 18, 2010

Droid Explorer in the top 10!

logo-home

Droid Explorer is, as of the time I am writing this, the #9 most downloaded project on CodePlex. I think this is awesome and want to thank everyone that is using Droid Explorer.

I have been hard at work fixing the issue with the Droid Explorer Service. This is the service that identifies when a device is connected to the PC and shows the device in Explorer. I will have the fix in place by the end of the week and published.

I have also been working the Droid Explorer branch that will become the 0.9.x release. This will be the first version that will support non-rooted devices. The only requirement is that the device can be seen via ADB. All functionality may not be initially available to non-rooted devices, especially in the first versions of the 0.9.x releases. I will be refactoring more and more of the code to stop using custom communication via adb.exe and use the same communication methods that the DDMS uses. This will be accomplished by using MAD Bee.

I am also shooting for an update mechanism being built in to Droid Explorer in the 0.9.x releases. It is going to be a framework that will use an Atom feed to get available updates. It will allow multiple update locations, to allow plugins to specify their own update feed source. Updates can define requirements, minimum/maximum version, and how to “install” the updates. But that is a bit off from being incorporated, it may not make it in until a few releases in to the 0.9.x releases.

Tuesday, August 10, 2010

Notepad2 Theme

xmlfileI love Notepad2. It is the “basic” text editor that should ship in Windows. It is one of the first things I download on a new system, I replace notepad with it, then I add the context menu to open any file in notepad2. I have recently moved to a dark color theme for all my text editors and base them all off the Coding Instinct Visual Studio color scheme. Here is a settings file for Notepad2 that is based on the Coding Instinct Visual Studio color scheme.

I have changed all the supported languages in the configuration, but I have not tested them all. Some may not be 100% correct, or there may be a color that just doesn’t look right on the dark background.

To import the theme follow the following steps:

  • Download the theme file
  • Open Notepad2
  • Press Ctrl+F12, or click View –> Customize Schemes
  • Click on Import
  • Select the downloaded theme file

Fixed link to the download. Seems like skydrive changed the link on me.

Twimager 1.0.25

screenshot Minor update to Twimager was released today. This update fixes issues with Twimager showing as a viewer for other types of images that were not supported. It also adds support for some other types of images, like ones on the device that you open with an application like Astro, for example. Also support for MMS images was added. Now you can click on the image in your MMS message and open the image right in twimager.

As always, Twimager is available for $0.99 on the Android Market, or you can get the limited version for free.

Monday, August 9, 2010

Windows 7 Skin TLB Command Line

shI have been a huge fan of True Launch Bar for years. I do not have anything to do with the product, nor do I get anything in return for “plugging” it. I use it a lot less now with Windows 7, but I still use it to put a command line right in the task bar. TLB is a highly customizable taskbar replacement for Quick Launch.

 

 

screenshotTLB offers a wide assortment of plug-ins, plus an SDK for developers. You can get TLB right now for $13.93, that is 30% off the normal price, and well worth it.

Now that you know what TLB is, I have created a simple little skin for the Command Line plug-in that gives it a Windows 7 look. Download the skin, then extract it to the “<TrueLaunchBarInstall>\plugins\cmdline\skins” directory.

Download Skin

Now if it were possible to update existing skins on the website. I want to lighten or even remove the dark border around the border so it looks better on lighter backgrounds. The zip file for the skin contains the skin image, but also contains the Paint.NET file so you can remove it if you wanted to.

Friday, August 6, 2010

Twimager 1.0.24 Released

twimagerA new release of Twimager is available on the market for purchase. This release adds full support for image caching, whether its the “thumb” view or the full size, zoomable image. Thumbnail images are now also loaded for the “thumb” view, for sites that support them.

The cache uses the external storage device, if available, and it can be cleared in the Preferences.

The preference screen was also slightly changed. The sections are now grouped together.

 [chart[1][2].png]

Thursday, August 5, 2010

Droid Explorer Download Stats

Droid Explorer has been increasing in popularity of the past year. Total downloads passing 85,000, page views at about 340,000 and since the projects first release in August ‘09.

downloads-graph 

The “Drop Off” is for a time span that CodePlex has not yet calculated the data.

The latest release has had over 1,600 downloads in about 3 days. Droid Explorer, in the last 7 days (based on when CodePlex does their counts), has had 4,440 downloads. This puts Droid Explorer in the #14 spot for most downloaded projects on CodePlex. About 300 away from the “patterns & practices – Enterprise Library”, and 600 from ASP.NET projects, like ASP.NET MVC.

Droid Explorer 0.8.7.1

htc-evo-4g I released a minor update to Droid Explorer the other day that addressed the following:

  • .NET 3.5 SP1 Check removed. This caused issues on Windows 7, even though it ships with .NET 3.5 SP1
  • Added icon for the EVO – thanks to sanjsrik for identifying the device for me
  • Added some debugging messages to the Shell Console so I can get some info from you Droid/Milestone users on what’s not working.
  • Application data is now cached, so they load WAY faster. The first time it still loads normally, but after that, zoom!

32 bit Web Installer
64 bit Web Installer

32 bit Full Installer
64 bit Full Installer

As always, the latest release is available @ the Droid Explorer CodePlex page.

Closing an activity by touching outside

I have been working on an application that I want to close an Activity when the user touches outside the activity. Like how you can set the setCanceledOnTouchOutside(boolean cancel) in the android.app.Dialog. The activity I want to close is themed like a dialog so there is an area around the activity that is not “active”.

I was able to achieve the desired effect by overriding the activity’s onTouchEvent(MotionEvent event). This method is called when a screen touch event is not handled by any views.

@Override
public boolean onTouchEvent ( MotionEvent event ) {
// I only care if the event is an UP action
if ( event.getAction () == MotionEvent.ACTION_UP ) {
// create a rect for storing the window rect
Rect r = new Rect ( 0, 0, 0, 0 );
// retrieve the windows rect
this.getWindow ().getDecorView ().getHitRect ( r );
// check if the event position is inside the window rect
boolean intersects = r.contains ( (int) event.getX (), (int) event.getY () );
// if the event is not inside then we can close the activity
if ( !intersects ) {
// close the activity
this.finish ();
// notify that we consumed this event
return true;
}
}
// let the system handle the event
return super.onTouchEvent ( event );
}

Now with that code in place, if the user touches anywhere outside of the dialog style activity, it will close.


SMS Backup

screenshot SMS Backup was always one of the first applications I had to install on my device if I had to wipe it clean. SMS Backup is released under the Apache License, Version 2.0 and developed by Christoph Studer. Development has pretty much been stale on this application for the past year.

That is where SMS Backup+ comes in. It is an improved version of SMS Backup, also released under the Apache License, Version 2.0 and developed by Jan Berkel. Some of the main differences are:

  • XOAuth support – Uses XOAuth to authenticate with Gmail, instead of you supplying your username and password
  • Faster – Does not base64 encode the emails before transferring
  • IMAP support – Doesn’t just work with Gmail (but defaults to Gmail), it works with any IMAP server
  • Restore – You can transfer sms messages back from email to the device.
  • MMS Not Yet Supported, but planned

This is one of the applications I like to place in the Ron Popeil category, because you can “set it, and forget it”.

You can install from the Android Market for free:

Droid Explorer 0.8.7.2

explorer A new release of Droid Explorer was published early today. It fixes the big issue with the server not being able to start. It also has some little fixes that wont even be noticed by most people. For example the extended glass area now doesn’t cause the window to move in an unexpected ways.

I will now be starting to work heavily on the 0.9.x branch. This will open Droid Explorer to many more devices beyond the rooted with busybox devices.

If you have any issues with 0.8.7.2 please report them on the droid explorer project issue tracker so they can be addressed.

Downloads

Application DroidExplorer.0.8.7.2.x86.Setup – 14974K
Application DroidExplorer.0.8.7.2.x64.Setup – 15142K
Application DroidExplorer.0.8.7.2.x86.Standalone – 32911K
Application DroidExplorer.0.8.7.2.x64.Standalone - 33078K

Droid Explorer in the top 10!

logo-home

Droid Explorer is, as of the time I am writing this, the #9 most downloaded project on CodePlex. I think this is awesome and want to thank everyone that is using Droid Explorer.

I have been hard at work fixing the issue with the Droid Explorer Service. This is the service that identifies when a device is connected to the PC and shows the device in Explorer. I will have the fix in place by the end of the week and published.

I have also been working the Droid Explorer branch that will become the 0.9.x release. This will be the first version that will support non-rooted devices. The only requirement is that the device can be seen via ADB. All functionality may not be initially available to non-rooted devices, especially in the first versions of the 0.9.x releases. I will be refactoring more and more of the code to stop using custom communication via adb.exe and use the same communication methods that the DDMS uses. This will be accomplished by using MAD Bee.

I am also shooting for an update mechanism being built in to Droid Explorer in the 0.9.x releases. It is going to be a framework that will use an Atom feed to get available updates. It will allow multiple update locations, to allow plugins to specify their own update feed source. Updates can define requirements, minimum/maximum version, and how to “install” the updates. But that is a bit off from being incorporated, it may not make it in until a few releases in to the 0.9.x releases.

Notepad2 Theme

xmlfileI love Notepad2. It is the “basic” text editor that should ship in Windows. It is one of the first things I download on a new system, I replace notepad with it, then I add the context menu to open any file in notepad2. I have recently moved to a dark color theme for all my text editors and base them all off the Coding Instinct Visual Studio color scheme. Here is a settings file for Notepad2 that is based on the Coding Instinct Visual Studio color scheme.

I have changed all the supported languages in the configuration, but I have not tested them all. Some may not be 100% correct, or there may be a color that just doesn’t look right on the dark background.

To import the theme follow the following steps:

  • Download the theme file
  • Open Notepad2
  • Press Ctrl+F12, or click View –> Customize Schemes
  • Click on Import
  • Select the downloaded theme file

Fixed link to the download. Seems like skydrive changed the link on me.

Twimager 1.0.25

screenshot Minor update to Twimager was released today. This update fixes issues with Twimager showing as a viewer for other types of images that were not supported. It also adds support for some other types of images, like ones on the device that you open with an application like Astro, for example. Also support for MMS images was added. Now you can click on the image in your MMS message and open the image right in twimager.

As always, Twimager is available for $0.99 on the Android Market, or you can get the limited version for free.

Windows 7 Skin TLB Command Line

shI have been a huge fan of True Launch Bar for years. I do not have anything to do with the product, nor do I get anything in return for “plugging” it. I use it a lot less now with Windows 7, but I still use it to put a command line right in the task bar. TLB is a highly customizable taskbar replacement for Quick Launch.

 

 

screenshotTLB offers a wide assortment of plug-ins, plus an SDK for developers. You can get TLB right now for $13.93, that is 30% off the normal price, and well worth it.

Now that you know what TLB is, I have created a simple little skin for the Command Line plug-in that gives it a Windows 7 look. Download the skin, then extract it to the “<TrueLaunchBarInstall>\plugins\cmdline\skins” directory.

Download Skin

Now if it were possible to update existing skins on the website. I want to lighten or even remove the dark border around the border so it looks better on lighter backgrounds. The zip file for the skin contains the skin image, but also contains the Paint.NET file so you can remove it if you wanted to.

Twimager 1.0.24 Released

twimagerA new release of Twimager is available on the market for purchase. This release adds full support for image caching, whether its the “thumb” view or the full size, zoomable image. Thumbnail images are now also loaded for the “thumb” view, for sites that support them.

The cache uses the external storage device, if available, and it can be cleared in the Preferences.

The preference screen was also slightly changed. The sections are now grouped together.

 [chart[1][2].png]

Droid Explorer Download Stats

Droid Explorer has been increasing in popularity of the past year. Total downloads passing 85,000, page views at about 340,000 and since the projects first release in August ‘09.

downloads-graph 

The “Drop Off” is for a time span that CodePlex has not yet calculated the data.

The latest release has had over 1,600 downloads in about 3 days. Droid Explorer, in the last 7 days (based on when CodePlex does their counts), has had 4,440 downloads. This puts Droid Explorer in the #14 spot for most downloaded projects on CodePlex. About 300 away from the “patterns & practices – Enterprise Library”, and 600 from ASP.NET projects, like ASP.NET MVC.

Droid Explorer 0.8.7.1

htc-evo-4g I released a minor update to Droid Explorer the other day that addressed the following:

  • .NET 3.5 SP1 Check removed. This caused issues on Windows 7, even though it ships with .NET 3.5 SP1
  • Added icon for the EVO – thanks to sanjsrik for identifying the device for me
  • Added some debugging messages to the Shell Console so I can get some info from you Droid/Milestone users on what’s not working.
  • Application data is now cached, so they load WAY faster. The first time it still loads normally, but after that, zoom!

32 bit Web Installer
64 bit Web Installer

32 bit Full Installer
64 bit Full Installer

As always, the latest release is available @ the Droid Explorer CodePlex page.