tag:blogger.com,1999:blog-13296234973448887952024-03-13T17:46:45.544+00:00alt236This is almost definitely a technical blog. Maybe.Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.comBlogger30125tag:blogger.com,1999:blog-1329623497344888795.post-16523825479878480182012-03-09T15:54:00.001+00:002012-03-09T15:54:10.923+00:00Java Multipart Upload Code (Android Friendly)
This is a quick function to do a multipart upload of a file in android (and Java in general).
It is adapted from Adrian Smith's code here: http://www.17od.com/2010/02/18/multipart-form-upload-on-android/.
The differences are:
This function will not try to read the file into a string (which imposes size restrictions).
You can pass the content type of the file upon execution
It Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com19tag:blogger.com,1999:blog-1329623497344888795.post-14588368244799678272012-01-05T18:59:00.000+00:002012-03-09T15:55:05.623+00:00Setting up a second monitor as the primary one in Gnome 3 (Ubuntu 11.10))
Gnome 3 (at least under Ubuntu 11.10) seems to have been shipped with a number of features missing. For example:
No easy way to change the screensaver (follow this: http://www.makeuseof.com/tag/change-screensaver-ubuntu-1110/).
No out-of-the-box way to change the system fonts (you have to use gnome-tweak-tool)
No out-of-the-box way to change the theme settings (follow this:Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com8tag:blogger.com,1999:blog-1329623497344888795.post-6232755450935011342011-12-29T00:09:00.002+00:002012-03-09T15:54:34.874+00:00Decompiling and displaying the source of an Android APK
This is a Windows-centric post, but it should be fairly straight-forward
to make this work in Linux/MacOS by porting the script file and
downloading the platform-correct version of JD-GUI.
Why do it
You are curious to see how an application does what it does by reading its code.
You want to make sure that your application is properly obfuscated before making it public (i.e. you don't Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com13tag:blogger.com,1999:blog-1329623497344888795.post-56269653598125241092011-09-20T01:09:00.001+01:002011-09-20T01:09:29.840+01:00Two ListViews Side by Side in Android
The following XML shows how to place two ListViews side by side, add some seperator views and button bars for any actions needed.
Even though fragment now make the creation and maintenance this type of layout much easier, simple application might benefit from this without having to include the compatibility library.
The result will look like this:
(The layout file is after the break)
<?Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com15tag:blogger.com,1999:blog-1329623497344888795.post-14549276588529680782011-09-19T23:42:00.001+01:002011-09-19T23:42:44.718+01:00Getting a Bitmap out of a Zip file in Android (or Java in general)
The following function will extract an image from a zip file stored anywhere on the filesystem (for as long as the application has access to it).
It will return a bitmap object if the image is found or null otherwise. This function should work in pure java as well with minor alterations (replacing the Log calls with system.outs).
public Bitmap getBtimapFromZip(final String zipFilePath, final Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com4tag:blogger.com,1999:blog-1329623497344888795.post-19255325082232277992011-08-11T20:21:00.000+01:002011-09-19T23:43:10.896+01:00Sending emails via Gmail (and others) in Java.The following class will send emails from a java program. It definitely works on Gmail accounts and if you know the settings it should work on others as well. Keep in mind that it needs the javax.mail jar in your classpath.
You can use it like this:
private static void sendEmail(){
String[] toRecipients = {"he@it.com", "you@yes.you", "hey@there.com"};
String[] Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com0tag:blogger.com,1999:blog-1329623497344888795.post-65445078763778426772011-06-27T13:07:00.001+01:002011-06-27T14:48:52.024+01:00Fixing the "Error getting final archive: Debug certificate expired on xx/xx/xxxx" problemIf you are developing Android applications for a while on the same computer (specifically for more than 365 days) you should be familiar with the "Error getting final archive: Debug certificate expired" error which will stop you from testing your applications.
When the Android SDK is installed, it creates a Debug Key which is used to automatically sign applications when you hit the run button Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com2tag:blogger.com,1999:blog-1329623497344888795.post-33040799041739404842011-06-24T11:56:00.000+01:002011-06-24T11:56:58.647+01:00Downloading and Parsing Vendor IDS files to CSV in VB.NetThe following function will parse an ids file and produce an equivalent CSV file. It has been tested with the following two ids files:
The PCI ven/dev list: http://pciids.sourceforge.net/v2.2/pci.ids
The USB ven/dev list: http://www.linux-usb.org/usb.ids
Ids files seem to have two sections; The first section contains the list of hardware and vendor IDs, while the second section has a list of Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com0tag:blogger.com,1999:blog-1329623497344888795.post-17950134638795633272011-06-21T13:48:00.002+01:002011-07-12T11:48:41.603+01:00Checking if an Intent handler or Activity is presentQuite often in Android you need to call a 3rd party Intent or activity.
For example, to scan a barcode using the Barcode Scanner application, or to start the "hidden" Field Test application in HTC phones.
In order to make the life of a user easier, it is a good idea to check if the Intent Receiver/Activity exists before you attempt to invoke it. Some of the reasons being:
If a non-existent Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com12tag:blogger.com,1999:blog-1329623497344888795.post-39720333397320485122011-04-17T22:23:00.000+01:002011-04-17T22:23:36.327+01:00Orange UK APN SettingsI've been flashing my phone quite often recently, and some ROMs do not contain the settings for the Orange UK APNs, so I am writing them here.
For the record, they are for Pay Monthly.
APN 1: Orange Internet
Name: Orange Internet
APN: orangeinternet
Proxy: <Not set>
Port: <Not set>
Username: <Not set>
Password: <Not set>
Server: <Not set>
MMSC: <Not set>
MMS Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com6tag:blogger.com,1999:blog-1329623497344888795.post-29132526033791928942011-04-12T11:14:00.003+01:002012-02-24T10:05:25.016+00:00Android Wifi password locations
The other day, I realised that I had forgotten my WiFi network password back at home.
The easy way to fix this would have been to use an already connected PC to access the router and change the password there, or to use an application like WirelessKeyView to recover the password of the said PC.
If I used method 1, I'd have to give the key to my housemates, which adds a bit of hassle.
When I Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com156tag:blogger.com,1999:blog-1329623497344888795.post-52510593191332155782011-02-21T21:39:00.002+00:002011-02-21T21:54:14.660+00:00Ubuntu 10.10: Mimo UM-720S single screen setup
I recently needed to temporarily put a screen on a completely headless system (no graphics card installed), so I decided to use a MIMO UM-720s which was lying around (almost literally).
Naturally, was not as easy at it initially seemed...
First of all, this guide is heavily based on the one written by Andrew Simpson, which can be found here.
SECTION A: Getting it to work
1. Install the Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com14tag:blogger.com,1999:blog-1329623497344888795.post-62080919411790686642011-02-14T14:46:00.002+00:002011-02-14T14:47:29.058+00:00Projector RS-232 CommandsThis is a quick list of RS232 control commands for projectors.
The command list is by for not exclusive, but the most common ones should be listed.
If a projector model is not in the list, try any other codes from the same brand. They usually work.
List of abbreviations:
[cr]: Carriage return character (ASCII Code: 0xd)
[stx]: Start of text (ASCII Code: 0x2)
[etx]: End of text (ASCII Code: 0x3Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com0tag:blogger.com,1999:blog-1329623497344888795.post-86328730972694365472011-02-10T17:29:00.000+00:002011-02-10T17:29:07.312+00:00Desire Z Modaco Rom r2 and protected Market applications.After installing r2 of Paul's Desire Z ROM, I noticed that I could no longer find or download applications from the Market if they have their Protected flag set
To fix this, you need to use adb to pull the build.prop (a type of ini file for Android, containing information about the ROM) to your PC and change one line.
So in a command line, type the following:
adb -d remount
adb -d pull /Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com0tag:blogger.com,1999:blog-1329623497344888795.post-28255150277029589242011-02-10T13:56:00.001+00:002011-02-10T17:14:40.905+00:00R4i SDHC Card Problems and SolutionsI recently started having problems with my R4i SDHC cartridge, after changing the MicroSD card. The problems started when I swapped my old 2GB card to a SDHC one.
It would act slowly, corrupt save games and display "Savfile not founded! [sic]" message when some games are loaded.
To solve it, I did the following:
Copy all ROMs to the desktop.
Reformat the card using the Panasonic SD Formatter (Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com2tag:blogger.com,1999:blog-1329623497344888795.post-55744362933876744802011-01-18T12:37:00.000+00:002011-01-18T12:37:35.942+00:00Market upgrade to v2.2.11 and loss of application linksA couple of days ago my Desire Z silently updated the Market application to v2.2.11.
No idea what the update actually brings (I guess stability fixes) but it had the side effect of removing all application links in the "My Apps" section. That means that no application was listed as Installed, and the only apps in the screen were the purchased ones.
After trying to use the Market Doctor feature Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com4tag:blogger.com,1999:blog-1329623497344888795.post-65158626993024493912010-12-17T15:28:00.003+00:002010-12-22T15:59:31.912+00:00Changing the build.prop on a X5A-GThe following procedure will make Skype work on a X5A-G, make sure that the unit is using the screen space properly (no more big icons) and possibly make it a bit smoother.
Make sure you are rooted, and that adb recognises the device.
Type the following to download the build.prop file to your harddrive:
adb -d pull /system/build.prop
Open the build.prop file with a text editor and set the Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com4tag:blogger.com,1999:blog-1329623497344888795.post-37252391025769914062010-12-16T20:58:00.001+00:002011-08-13T11:05:23.230+01:00HSG X5A and ADB DriversSimilar to the previous posts about the Desire Z and Android devices in general, the lines you need to follow the following procedure to get a HSG X5A (which is actually a decent device which can playback full HD with no problems):
1. Make sure you have updated the SDK and the USB driver to the latest version.
2. Open the android_winusb.inf file (located under the android-sdk-windows\Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com1tag:blogger.com,1999:blog-1329623497344888795.post-38262940523310026952010-11-12T00:35:00.002+00:002011-08-13T11:04:06.065+01:00HTC Desire Z (AKA HTC Vision AKA T-Mobile G2) and ADB driversI just got myself a Desire Z and once again the ADB drivers fail to install in windows.
It is the same problem described and solved in this post.
To fix:
1. Make sure you have updated the SDK and the USB driver to the latest version.
2. Open the android_winusb.inf file (located under the android-sdk-windows\usb_driver directory) using a text editor. I personally prefer Notepad++.
3. Add the Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com24tag:blogger.com,1999:blog-1329623497344888795.post-48081294688208204682010-11-07T20:41:00.008+00:002010-11-09T13:50:31.949+00:00"Unable to open connection to server" error when connecting to Exchange on Android 2.2There seems to be a problem when using the default Android Email application to connect to an Exchange Server 2010 SP1.
When you go through the setup procedure and enter all necessary info to setup a new account on the phone, the setup will eventually fail throwing a "Setup could not finish" "Unable to open connection to server." message.
On the server side, the following log is generated:
Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com14tag:blogger.com,1999:blog-1329623497344888795.post-24063344888985167782010-11-06T21:19:00.000+00:002010-11-06T21:19:55.286+00:00Autostart script changes for Calibre 0.7.27In version 0.7.27 of calibre, the "auto reload" command has been unbundled from "--develop". As a result, the script in the previous post has to be updated. Only the script changes, the rest of the procedure is the same.
The "DEMON_ARGS" line changes from
DAEMON_ARGS="--develop --with-library=$CONTENT --pidfile=$PIDFILE --port=$PORT --max-cover=$MAX_COVER --daemonize"
to
DAEMON_ARGS="-Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com3tag:blogger.com,1999:blog-1329623497344888795.post-844700816699343492010-11-04T18:21:00.002+00:002010-11-04T18:27:21.969+00:00Downloading and Parsing the IEEE MAC address OUI to a CSV in VB.NetThe following function will parse a OUI file and create a CSV file where each line will contain the first six characters of MAC address and the company they are registered to. To see how a OUI file looks like click here (it is a couple megabytes long).A function to download the OUI (or any file via HTTP) is also provided after the break.
It takes two parameters: "FileInPath" is the location of Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com3tag:blogger.com,1999:blog-1329623497344888795.post-74672108290139809072010-10-13T16:32:00.002+01:002010-11-04T18:26:14.464+00:00AxVLCPlugin2, Visual Basic 2008 and Windows 7 64bit - clr20r3 and REGDB_E_CLASSNOTREGI've been writing an application to monitor multiple streams in VB 2008 and I started using the AxVLCPlugin2 which comes with VLC.
It is a nice plugin and apart from a few problems (it will not go fullsceen in version 1.1.4 for example) works fine for any stream that VLC supports.
I do most of my work on a 32bit XP box at work, but sometimes I like to work on projects at home using my 64bit Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com3tag:blogger.com,1999:blog-1329623497344888795.post-26331136941284746052010-10-12T22:08:00.003+01:002010-11-04T18:26:53.248+00:00Setting up an AXIS 241QA Video Server to Control an Everfocus PTZ CameraCamera Setup
1. Set the protocol on the camera to Pelco-D.
2. Set the baud rate to 9600bps.
3. Give a unique address to the camera.
For the Everfocus EPTZ500 cameras, the setup DIP switches will look like: 10 00 00 00
AXIS Server Setup
1. Set the RS485 mode to “Pan Tilt Use”.
2. Load the Pelco driver. It can be found at the Axis website (there is a link in the server’s web UI).
3. Check the “Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com0tag:blogger.com,1999:blog-1329623497344888795.post-76085819510271631152010-09-21T03:17:00.001+01:002010-09-21T14:29:58.281+01:00ADB driver installation fails after ROM update or changeSometimes, after changing the ROM in an Android device, ADB will not detect the phone when you plug it in.
This can happen because:
The rom is a different OS version and there an updated driver version exists, so you will need to update your SDK.
The update changed your device's PID (Product ID) and/or VID (Vendor ID). These two values are used in USB devices to identify them and to select the Anonymoushttp://www.blogger.com/profile/17749732800720245223noreply@blogger.com3