Android ServerSocket Permission Denied

I was just trying to create a web server application and ran into this, so I thought I’d share it. I wanted to run my Android web server on port 80 (since that’s where web servers usually run), but I kept getting a BindException saying “Permission denied”. Note that ServerSocket, of course, requires android.permission.INTERNET in your manifest.  After a little digging, I’ve learned that ports 1-1024 are protected and only accessible by root (pretty much eliminating them for any app that you want to make widely available, since most people don’t have rooted phones. To get around this, of course, all you have to do is use a port greater than 1024…I was just hoping to cut down on the amount of typing when connecting to my web server from a browser…oh well.

How to Factory Reset Samsung Galaxy S II (Epic 4G)

I just recently upgraded to the new Samsung Galaxy S II (or Epic 4G in Sprint speak), and today I’m posting my first video about the phone.  I’m really liking the Galaxy S II, mostly because of it’s beautiful, large AMOLED screen—it truely is very pretty!

It’s not something you need to do everyday, but when you’re locked out of your phone, knowing how to do a hard reset is crucial.  So with that, here are the steps to perform a factory reset on the Samsung Galaxy S II Android phone.

Note:  Remove your SD card.  I know some people say this is optional and in my experience it is technically optional.  But here’s the thing, I’m not interested in taking any chances when it comes to my data.  I keep my contacts backed up on my SD card as well as store pictures, documents, etc, and I’m not going to take a chance on loosing them.

  1. Remove your SD card.  This done by removing the back of the phone case and pressing the SD card into it’s socket.  When you release pressure on the SD card it will pop out and you can remove it.
  2. Hold down the Volume Up and Power buttons simultaneously.
  3. Continue holding the Volume Up and Power buttons until the Samsung Galaxy S II logo screen is displayed.
  4. When the Galaxy S II logo screen is displayed, release the Power button but continue holding the Volume Up button until the Android System Recovery menu is displayed.
  5. Once you are on the Android System Recovery menu, select the wipe data/factory reset option.  Moving the selection up and down is done with the Volume Up and Volume Down buttons.  Once you have the wipe data/factory reset option highlighted, you select it by touching the Home button.
  6. Once you have chosen the factory reset option, you will see a confirmation screen.  Highlight the Yes — delete all user data option and touch the Home button to select it.
  7. The procees of wiping the phone should only take a few seconds and when it is finished, you will be returned to the Android System Recovery menu.
  8. Highlight and select the reboot system now option
  9. You phone will reboot back into normal operating mode (this first boot will take a little longer than usual)
  10. Reinsert your SD and put the back cover in place.

If any of that is unclear, hopefully this video will help clear things up…

Resolving “Can’t upgrade read only database from version 0 to x” Exception

Just had some fun chasing this one down!  If you’re getting this exception, go look at where you define your table schema.  Most likely this exception indicates a malformed table definition statement…in my case I was missing a comma!

Tags: , ,
Posted in Developement by kgmoney. 4 Comments

HTC Evo Reboot Loop Solved?

I think I might have mentioned once that I was having trouble with an Evo reboot loop…  If I didn’t let me give some background.  I got my HTC Evo 4G back in June 2010 when Sprint first released them.  It’s a great phone, but sometime the following September a problem arose where it would randomly restart while I was in the middle of doing something (using Google Navigation, for example, seemed to be a real problem).  To make matters worse, it would usually proceed to get stuck in a reboot loop, and eventually just freeze on the initial power on screen (white with HTC in green letters).  This shutdown/restart problem continued to get worse until a couple of weeks ago it was at the point where I could do almost nothing with my phone without it rebooting–not acceptable!

Finally, last week, I took it back to Sprint to see what they could do.  I have to admit I was ready for a fight…I figured they wouldn”t be very willing to help me.  To my surprise they said they needed to reset the phone and if that didn’t work they’d replace it.  I knew the reset wouldn’t work ’cause I’d done that plenty of times myself, but I figured I’d humor them.  No suprise, 5 minutes after the reset, my Evo was back to its reboot loop.  So, true to their word, they (Sprint) ordered me another phone!

I got my ‘new’ Evo a couple days ago, and while I don’t know whether it’s actually new or just refurbished (they claimed not to know either), it *appears* to be brand new.  At any rate, I’ve not seen the Evo reboot loop once so far!  Now, to be fair, it took a few months to see it the first time, but I’m hoping for the best!  Hopefully, it was just an early manufacturing bug or something.

All that to say, if you are having similar issues, I recommend taking it in…they might actually help you!

Also, I’ve seen other posts around the Internet about people experiencing the Evo reboot loop, but I’ve not seen any real answers.  If you have any idea to the root cause, and better yet a real solution, please post it here!  It would be a huge help to those of us with the same Evo reboot loop issue.

I’ll post any new developments as well…

Posted in Uncategorized by kgmoney. 17 Comments

Show Your Android Spirit with a Beanie!

I just came across this…http://androidbeanie.com/…hilarious!  I have to say I never cease to be amazed at what people come up with!  I might just have to get me one of these!

Tags: ,
Posted in Anything by kgmoney. No Comments

Android Market Goes to the Web!

It’s not so much a problem as it use to be, but Google has finally released the web version of the Android Market!  They seem to have done a decent job of it too.  Now you easily browse the market from your computer rather than just using the small screen on your phone.  There, of course, have been other websites that have filled this gap until now, but now the official Android Market can be browsed from your desktop.

Posted in Android Marketplace by kgmoney. No Comments

Android Barcode Scanner – Android App

Android barcode scanner apps are old news to Android veterans, but if you are new to Android, a good barcode scanning application is a ‘must-have’ for your Android device.

An Android barcode scanner uses the device’s built-in camera to take a picture of a barcode and then the app decodes the contents of the barcode for your use.  Now you may think this may not be very useful, or even interesting, but combine this barcode scanning technology with a database of products, a library of books or cds, or any other large set of data and you’ve got a very useful lookup tool.

One of the most popular uses of an Android barcode scanner app is for looking up products on the Internet.  This allows you to be shopping (even in the store ready to buy something), and do an instant price check to see if you are getting a good deal or not.

QR code

QR code

Another common use for scanning barcodes with your Android device is navigating to websites.  This one is extremely handy and allows you to, again, just point your phone’s camera at the barcode and navigate, in a matter of seconds, to the encoded website.  This is being picked up on by advertisers and I now regularly receive mail with barcodes (similar to this one) printed on the outside of the envelope.  What a fantastic way to make it easy for people to reach your website.

An Android barcode scanner app can be used for much more that what I’ve just highlighted, but those are a couple of my favorite uses.  If you would like to make your own ‘QR’ codes, or just learn more, check out http://zxing.appspot.com/generator.  The ZXing Project also has a very cool Android barcode scanner app for download in the Android market.

Location of ADB changed in Android SDK 8

A quick note you Linux based Android developers… I have was trying to use ADB this morning and discovered that since my update to the Android SDK to version 8, the ADB executable is no longer located at …/android-sdk-linux_x86/tools/adb! It is now at …/android-sdk-linux_x86/platform-tools/adb. It took me longer than it should have to figure this out and I couldn’t find the info on Google anywhere…so there you have it!

Tags: ,
Posted in Developement by kgmoney. No Comments

Multi-Select android.preference.ListPreference

I was just looking for a way to have a preference that was a list of values from which the user could select multiple values using checkboxes. A quick Google search lead me to this tutorial (http://blog.350nice.com/wp/archives/240). Very useful!

Make an Android Email Intent with ACTION_SEND!

It’s an example of what Intents are all about in Android, but today was the first time I’ve used the android.content.Intent.ACTION_SEND action to allow users to send emails, post to Twitter or Facebook, send text messages, etc!  It couldn’t be any easier, here’s the code:

Java
1
2
3
4
5
Intent myIntent = new Intent(android.content.Intent.ACTION_SEND);
myIntent.setType("text/plain");
myIntent.putExtra(Intent.EXTRA_SUBJECT, "My Subject Line");
myIntent.putExtra(Intent.EXTRA_TEXT, "My Message!");
startActivity(Intent.createChooser(myIntent, "Choose app"));

That’s it!  Any applications that the user has installed that can handle the ACTION_SEND intent will be listed in a nice system popup window.  On my Droid I see Facebook, Gmail, Messaging (text messages), and Twitter.

Enjoy…