Saturday, December 24, 2011

Dropbox 2.0 for Android: fixing your folder

I don't get why so many people are pissed at this. The old folder location was at ${sdcard}/dropbox. This is really good for an app like Dropbox and I wish they would have kept it, but to be honest, it does technically belong in the new location of ${sdcard}/Android/data/ Although I would've used dropbox or cache instead of scratch but whatever.

Don't like it? Well guess what, fix it yourself. Open a terminal emulator [0] [1] and do the following:

example# ln -s /mnt/sdcard/Android/data/ /mnt/sdcard/dropbox

If you get an error about no ln command being found, you should install busybox and add it to your $PATH.

If you've got a real MicroSD card, you may get an error about the operation being unsupported (etc). In which case you either need root or you need to use a file system that supports symlinks. Which means probably reformatting your memory card as NTFS, or EXT4, or YAFFS2. Whatever your shit can read, because FAT32 is probably not going to support symlinks.

If you've got a device like my Transformer, that has an internal memory on /mnt/sdcard (${sdcard}), odds are the actual data is somewhere behind a FUSE shim, and is really stored at something like /data/media on an ext4fs partition. Easy symlinkage!

If none of the above makes any sense, you only no one tenth the power of Android and should have learned more about unix and Android, or maybe have bought an iPhone.

Thursday, December 22, 2011

Thoughts on Android Game architecture

Games for Android are a little different than writing for PC or console, really seems to be less of the dull grundge as well. But at the price, for more advanced efforts there are less resources sitting right there on Fresh Meat or Source Forge for the hunting up. Me being me, of course, I aways have an interest in cross platform portability (as well as a general disdain for Oracle Java).

One thought that occured to me, is why not do it the same as I would on a PC?

What is the activity to a game? What the user sees. All it really needs to know is processing input, rendering output, and talking to the big cheese. That's it. Hell, before we talk communication methods, step back and think there: an Android activiy and a Windows executable could both function as clients, talk to the same server, and have a cross platform multiplayer game. Or even a screen like detach/reattach feature where you could begin playing on your mobile phone, then switch to a PC with way better graphics. Threating the user side of the app as a "Client", it would be possible to have a low-end client for basic phones and a high definition client for sexy tablets.

To make it work, we need a service program to communicate with. On a PC, I would probably use shared memory for offline play and sockets for network play. In favour of shared memory, would be the ease at which C++ code would likely be tweakable to use a shared memory allocator to store command objects, rather than having to do as much extra leg work to serialize the information within across a process boundry. Android land makes most issues a moot point. Network wise, I'd probably just use JSON.

Something that interests me, is how much of the core game design be implemented in such a way, that it could be used off Android by reusing the same library. C code, whatever C++ code the NDK can compile, or Java code should all work, as long as long as one watchs what non-portable bits are stuffed in there.

Putting this much thought into it, can probably be blamed on poking around the FreeBSD and Q3A source trees over the years, and finding the possibilities fascinating lol.

Friday, December 16, 2011

My word, if you're not using Opera and it's Dragonfly for web development, all I can say is Firebug users, eat your bits out.

Hello old friend

Well, I've just done something unexpected: I installed Opera on my workstation.  It has the operating systems default (a red dinosaur) and Google Chrome setup, which I have used since I got tired of diving into Firefox only for Firebug. In practice, I find Chrome's stuff to be equally useful to me.

Now, why did I install opera? Generally I like to keep my environment pretty much the same; a look at my shell profile would make that obvious. At home, Chrome has developed an odd problem on my desktop, Dahlia. No sound plays: be it from Flash or Silverlight. Haven't tried anything else, since e.g. WMV and QuickTime seem to have died out in the last lustrum (good riddens QuickTime!).

So, I am considering replacing Chrome with Opera as my defacto standard browser, as much as I love Chrome, do I really like openning another browser whenever I want sound? If you say try Firefox (or relation there of) I will find where you are and unplug your Internet with a vengeance. The only other browser Dahlia has is Internet Explorer 9; which is actually a nice enough browser to use but doesn't even meet my criteria as well as Mozilla.

Pluses for Opera:
  • We're old friends: I used to use Opera 8.5 - early 9.x as my daily surfer.
  • It's stable, tried, true, and reliable.
  • I use Opera Mobile on my Androids.
  • It's not the fattest ass at the track, *cough*.
  • Tomorrows staple feature is usually probably be todays Opera feature.
  • Some moron developers treat Opera like a deranged step brother.
  • Silverlight isn't officially supported, but probably works.

I find it startling how much alike Opera Mobile and Opera is. All that is really missing is more advanced settings, and 'lesser' used features like gesture support (cool) and panels.

We'll see what happens but I'll give the experiment a go. Something that especially interests me, it seems that Opera Dragonfly is more or less the same thing as what Chrome has, plus "Opera Turbo" may be a viable option. At work, things can get really congested on the network, especially the wired one my desk switch, workstation, and test units mate with. So WiFi is usually the only way to browse to Internet resources - Opera Turbo might help with the network spikes, so I've got it set to automatic here, at home I won't need it.

Opera Turbo is a function that feeds data through a proxy server for compression, all that means to normal people is that if your computer is older than petrified dog shit or you're on a slow network, you get faster page loads. The privacy issue doesn't bother me much, not at work. No one is watching closely AFAIK but there's little to find past e.g. editing my calendar.

Thursday, December 15, 2011

I've read my first bit of Lovecraft today, in the form of a "The Tomb", a quaint tale that gives cause to question the narrators sanity or our reality; that or I just think to much! That puts me about 1% through The Complete Works of H.P. Lovecraft according to the Amazon Kindle app on Andera. So far, I think I'm going to like these,  and along with the games and various development tools on my tablet (and my jot), should help pass the long flights I have coming up after Christmas.

Hmm, that was about 160 some screens by my arithmetic,  which should translate to maybe 50'ish pages in a real hard cover book; going by the standardesque side for a novel anyway. Most are short stories as well, so it sounds like the stories should be a good fit for my current life style. One that sadly, doesn't seem to find room for that many good novels :-(. I've always had an avaricious taste for reading, but the fluctuations of time and money over the last lustrum, have been rather, light. I don't really have any shelf space left either, so aquiring new (from my perpective) books is best done in electonic form.

Can't say that I will ever appreciate the feel of a computer as much as a real concreate book in hand, but I will admit: for cost, space and travel reasons. It's a damn good idea. As much as I like the idea of digital copies though, I do not look forward to a world without "Traditional" books in it. Yeah, so what if I'll probably belong in a mausoelum by the time I'm legally an old fart. I like sitting with a book in hand!

For a little while, I have been looking at two possible resources: Amazon Prime and Netflix. I've used the free offerings of Hulu and paid offerings at Comcast's XFinity (our ISP) and Crunchyroll.

Amazon Prime I think is just this awesome deal, that you can't beat for the price; assuming you're willing to pay. Basically, you get free two-day shipping and some of the films on Amazon Instant Video can be streamed for free, rather than renting or buying it. Supposedly streaming should work anywhere that Flashplayer does. Not my favourite software but it's a better option than Silverlight IMHO, assuming you want cross platform support. I don't order that much stuff but when I do, it will usually come from Amazon or eBay, whoever gives me the better deal. Between the video and the shipping, it's like an awesome deal. Can't say that I've looked at the Kindle part much, so IDK how well it integrates when using everything but a Kindle device. Selection also looks pretty good but not unlimited, sadly. I may very well give it a try, but will hold off until the shipping is more useful.

Netflix on the other hand, is an interesting wild card that I'm trying out now. A lot of people either left Netflix or have an uneasy relationship with the company after the whole fiasco with the Qwikster idea and the plan split; if I was an investor I would. You can get unlimited streaming or disc rental, or pay more for both. I'm fine with that, especially with the price tag. What interests me though, is the recommendation stuff and the selection. I was impressed with the selection versus XFinity and Hulu, majorly impressed; although the starz thing worries me. How it guesses how likely I am to like something seems accurate enough to take into consideration when choosing a movie, based on what it's given me for movies I already know. That on it's own is worth while, with a sufficient selection versus XFinity. The number two problem I have with XFinity is of course, out of what I /can/ watch: what should I watch? That's a time investment in entertainment you know.

XFinity is a great, if you already get a premium cable service through comcast, it is worth checking out. What irks me though is that a lot of things are either unavailable or only can be played via the set top boxes on demand programming. They're not the best at web development, only support Windows and iOS for playback; which is a sequence of progressive groans for me but at least there's a pretty reasonable amount of content, at no extra charge past the cable bill. The problem is, when I want to watch something, it's a crap shoot whether or not I'll be able to—and I don't haven't had my own TV for a year.

Hulu is better for general TV, not so much for more premium content IMHO, so I don't really see any sense to a Hulu Plus subscription. For people that prefer series it's likely worth it, especially if you want more recent ones and don't have all the DVD sets.

Crunchyroll, if that sort of thing rocks your boat, is worth membership just because the advertising is too frequently the same.

Of course, another option is renting stuff off the Android Market or similar but I'm too cheap most of the time lol. Odds are I could even get a new TV tuner and hook it up to my modem but I'm to lazy and to cheap for that.

Wednesday, December 14, 2011

Well, I would say things are at an all time low.

My mother curses at me for walking away from my family in favour of a stranger, and I can't help but wonder, why on earth would I walk towards her? I've done nothing unduly hostile towards the rest of my family, except block them from my photos: because she would not stop using that situation to attack me. It's between her and I. Just like when I was a child and my mother and brother were at near constant state of war; she tried every method of using me as leverage against my brother. As she often worded it, we were a "Packaged deal" and he wasn't allowed access to me unless he chose her as well. Ain't it a peachy family I grew up with? Damn she even leveraged my father ordering it as often as her packaged deal crap. Present day, every now and then I get bitched at because I have little to do with my brother. He now lives 70 miles away. Well guess what, when he lived 200 feet away I was regularly forbidden from having anything to do with him without being given much pain for trying to. We've more or less been grown into our present relationship, by our mother, because that is what she wanted for years, and expressed on more occasions than I can enumerate. Just because they're at peace now is magically supposed to change something there? That is ridiculous! It changes nothing that my turning 18 didn't. Now she makes efforts to do the same bologna with bringing extended family into the affair. I don't care. 95% of my extended family have nothing to do with me 100% of the year: her GOD parents and occasionally my father's sister. It's not a weapon, it's just words she can throw. My mother is a small and hateful person in private. I and the girl I love have been verbally abused and slandered enough that I am no longer on speaking terms with my mother until an apology is issued wich is about as likely as being hit by a meteor. And I have no intentions of changing that decision what so ever, my concious will not be bothered in the least if that lasts for life. Some time ago I learned the meaning of "A hater is going to hate", because that's how my mother is. She doesn't know how to love or care past her own concerns, not in my experience over twenty some years. I gave my mother nearly seven years of my life, as unpaid labour in her under the table cleaning business. I put up with her trying to crush my efforts to get a driver's license and a real job; I tolerated her hatred for me finding a truly awesome job and her attempts to derail it; I paid her more than I could afford out of my income, never asking for a dime back; I skipped moving out so I'd know she'd be O.K. and paid for it, then let her skip paying it back; I have even loaned her money, to the point of skipping my desires and getting in danger of being stranded, and allowed her to borrow enough that I'm not writing it off. But I am not a retard. My mother complains that she didn't get anything out of having kids: since my grace, patience, and mercy are not as great as Mother Teresa, I think maybe she shouldn't of had any then. I once needed antibotics for an abssessed tooth that had my jaw swollen up like a golf ball. That's the kind of condition that can become fatal if left untreated. It's been used against me at every turn she pleases, that she took me to a dentist for that (instead of letting me get worse and die?). I've given her many times the cost of that dentist trip without any expectation of return and loaned her many times more past that, to the point that I need to make it a standard debt just to stop her from using me for a blank check. Every time she has needed to go in for a checkup, I've taken her and lost count of how much I've helped her there in terms of cash. But wait, it's still attempted leverage against me because it fits into her little world view of things. Everything a parent should do in that type of regard, is used against me and I'm treated like the scum of the earth when I help her. I don't think my mother can love or care for anyone because it seems like nothing can get past her shelfishness, or maybe I'm the only one that thinks you have to care more about someone else than your own interests, at least some of the time. Is that being a loving and caring parent? I don't think so. I think maybe my mother could use mental help but I'll be damned if I'm paying this time.

Tuesday, December 13, 2011

This entry is just to test the share to g+ thingy; if you haven't converted from Blogger profiles to G+ ones yet, you ought to :-).

I just wish it was automatic or could be made to work with something like twitterfeed.

Sunday, December 11, 2011

My first self cooked lunch

Today, I did something odd in making my own lunch, and actually cooked. Needless to say, I generally don't cook in my mother's kitchen if I can help it, but this time I got

I warmed up a left over salisbury steak and cut it up into pieces and a slice. Then I mixed up three eggs to make in a pan, trying to get all the liquid to cook reasonably solid and spread out; flipped it over and pressed it a little and let it cook. Mushed some bits of the salisbury steak and folded it over, and pressed it for a bit, flipped & repeated. In retrospect, I really should've added some pepper for flavour and bits of cheese to bind the meat together.

For the sandwich, I put mushed bits of the meat on, layed by a slice of cheese, the slice of meat, another slice of cheese, and more mushed bits. Not sure if only buttering the pan-facing sides was smart but I loved how it came out, and decided to burn one side a little bit, just to make sure it would be strong enough with so much inside. I loved how that sandwich came out xD.

Generally I'll make do with left overs or make a normal sandwich, it's just the most safe way to avoid dealing with the parental  unit. In this case though it worked well enough (Y).

Friday, December 9, 2011

Do you really want to put one of these to your ear or anywhere near your precious fingers?

source: Android Police.

Or one of these?

I like my fingers in tact, thank you!

Thoughts on Android development *ON* Android

I'm crazy enough for it, after all BTEP+{bash,vim,coreutils,etc} on the TF101 is about as pleasant as on a netbook. The difference between BTEP and XTerm, makes something like Screen or TMUX a necessity IMHO and I favour the latter. Also copying and pasting from vim to Android apps is different. Without vim's X support, a temp file is the best solution until BTEP gains real support for text selections.

My point being, if you can use a netbook and a command line environment, doing it on Android is no different. Hell you could even SSH into a phone from a PC if you lack a Transformer or a tablet+Bluetooth keyboard setup. Only people that _require_ something like Eclipse or Visual Studio are seriously impacted, and emacs and vim are good tools when combined with GNU tools (BusyBox a bit less so).  I have the equal of Debian without X.Org running on my transformer, a decent terminal emulator, and a real keyboard. So I am well equipped.

Now, the sticky part is actually being able to compile and run Android Java programs. You can write the code on a napkin if you want but that doesn't work with your devices CPU quite so easily.

Android developers should already know the compilation model:

        *.java -> *.class -> *.dex -> classes.dex

A compiler is used to convert the source code into Java bytecode. This technically means that any language that you can get running on a JVM, and interface with Java code, you can probably use for Android development; in practice I'm sure there are more devils in the finer details.

After we get the Java bytecode, we have to convert it into a format for the Davlik VM to run. That's where the dx program comes in. It translates Java to Davlik.

Because applications are rarely composed of pure source code, especially Android ones, things get slightly more complicated to create a .apk file you can install. The packaging tool aapt, apkbuilder, and aidl programs join javac and dx in creating the .apk file, the end goal of our the toolchain. In practice: .apk is pretty much .jar, which is pretty much .zip. Only classes.dex is used instead of a .class file per class in your code, and something I wonder why Sun never thought of!

Now, the issue is obviously how to run all this shit on an Android device, like my Transformer.

Google only publishes SDKs for Windows, Linux, and OS X systems on x86, Linux+ARM isn't supported, sadly. Installing an x86 emulator and a mini distro with Java  and ssh is over kill, even for my Debian chroot loving self! BUT most of the SDK is in Java or BASH!

Java runs on Debian/ARM, so we can install a JDK and JRE, and thus get access to the Java side. Bash is already available for Android, let along Debian/ARM. So! The point of concern becomes x86 binaries. That seems to amount to most programs in platform-tools/ and tools, but what do we /actually/ need? Well guess what Jack, if we're doing development on device, we don't need the emulator! AFAIK the tools we do need are:  apkbuilder, dx, javac, probably jarsigner. The aapt and android programs being good to have, ditto for ant I'm sure.

aapt is a binary, so at best it would have to be natively or cross compiled, and much like make in C country, we can probably do it another way. The source is probably in the Android Open Source Project (AOSP) somewhere, which would make this easier.

android, apkbuilder, and dx are bash scripts.

android sets up an invocation of the Java VM (java) with tools/lib/sdkmanager.jar and a suitable SWT JAR and runs the program. I don't know if SWT needs to be in the classpath when running it in command line mode, but hell, Debian/ARM = SWT deb somewhere.

dx is similar but uses platform-tools/lib/dx.jar.

ditto for apkbuilder, but using tools/lib/sdklib.jar

In looking at the manifests, a suitable Java execution environment is all that is needed for the serious leg work. That surely can be done using the JRE and/or JDK debs. Hoorah! And obviously the point of the "platforms/android-*" stuff is for javac and the emulator to work, android.jar in particular is our interest.

One downside, dealing with Renderscript or NDK stuff is another delema as obviously those rely on binary stuffs that are not Java, and AFAIK the toolchain for Renderscript depends on an LLVM frontend, so idk how to deal with that yet, but I'm not worried about it -- most applications shouldn't be using renderscript, unless maybe you're making Modern Warfare 4 on Android >_<.

So I think, I is in business.

PostScript: I am aware of the Terminal IDE app but prefer to be closer to the official SDK and I would rather stick closer to my Debian chroot, especially because BTEP+tmux is a better place for using VIM with a real keyboard.

Monday, December 5, 2011

I can't hep but think, that my brain is trying to tell me something, when I find myself fumbling with

In the gmail app on Andera, viewing a message displays the message list off to the side as a fragment. None of that &lt; or &gt; buttons for Android. I'm so used to it now, that in Chrome, I was almost thinking, "WTF where did my message list go?" when I saw the usual "Labels" side bar. Oi vey, I need to stop using PC's so much!!!!

Saturday, December 3, 2011

Right, this is some real bullshit. I stick a DVD of Spaceballs into my computer, and get an ELUA pop up for software from "Sonic Solutions". It is so bland that I can't even tell what the fuck program it is for (but Google explains), so you can obviously conclude, I ain't accepting it with such a bland and faceless ELUA, belonging to bloatware I don't even need.

But, and the big but is, it notes that it may even include the LAME MP3 encoder, which really pisses me off because they couldn't even be bothered to decide yes or no for the ELUA  \o/.

Friday, December 2, 2011

I do think this has to be the first cube that doesn't just suck, that I've drawn free hand in a long, long, long time.
While it was on sale over Cyber Monday, I bought a copy of SketchBook Pro from the Android Market. Can't say that I have any skill left at drawing, if I ever did really. I haven't touched a pencil to a piece of paper that way in so many years now, I don't even want to think about it. Probably a waste but I ordered a stylus, in the hopes of something more fine than my finger. I've an occasional interest in computer graphics but can't say that a mouse really does it for me, if I'm thinking about drawing, my head understands how to use a regular pencil or charcoal. A finger is honestly more astute for my brain than a mouse cursor. Needless to say, I'm not the kind to be found in Photoshop so much as vi.

Far from perfect but hey, if I can't even remember the year two thousand and whatever I stopped drawing in, I'm proud that it doesn't look to terrible.

After being busy between the lab at work and my mother's steady pestering, I miss having time to update my journal - what a wonderful thing weekends are!