Monday, January 25, 2016

Replica App: To-Do List, and More News On My Phone

I've recently had a few good ideas about the direction my Replica App (in which I'm trying to duplicate an app I currently use at work) should go, and some things to add. Some or all of them will include more complicated things that I don't know how to do yet, so I thought it might be a good idea to detail it here and see how it goes.

  1. Actual Functionality:  Let's see... first I thought it would be cool if the app provided some kind of useful function, even though it might not be anything anybody would actually want to use in everyday life haha, being that it essentially is an inventory-keeping application. Up to this point though, I've really only been duplicating what it looks like and the various screens you will get to, but it would be nice to add functionality to the screens.
    When you think about it though, it is more complicated than it appears on the surface; I think it will require a database of sorts to keep track of all the items and locations you add to it. At work, if I haven't explained it already, we use the app on an iPod to scan items into locations on the shelves in the backstock rooms. You can scan the barcode of an item, and it will pull up any backstock location it might happen to be stocked at, as well as typical information like a short description of what the item is and what the cost and retail price is. It also includes a Division and Item Number, and usually a SKU. The Division is a one or two digit number which goes to certain departments in the store (it is a department store, so for example "Men's" or "Small Appliances"). The Item Number is five digits, and unique to each individual item within a division. The SKU usually refers to a size if it is clothing, and is three digits though common numbers are "003" and "005" and so on.
    Well, in my version of course there will be no scanner (you can manually enter the Division/Item Numbers or UPC barcodes on the ones at work, but obviously that's slower). It is what I will do on my home version, but that's where the database will have to come in. There will have to be some file that contains all of the UPCs of any items I add as well as their corresponding information - a made up Division/Item Number/SKU, as well as price and description if I want to go that far. Then, I will need to have locations (I'm thinking of a bedroom, or entire house - closet shelves, dresser drawers, pantry shelves, etc etc). After seeing the code for my brother's Blood Touch game, I'm wondering if that will best or easiest be done using a JSON file, but I really have no idea right now. What it will mean is that my app will have to save information I suppose (the apps at work connect to a network which stores all the info) but I think it will be simple enough to create the database within the app.
  2. System Bar:  As the real app is on Apple iPods, it has the Apple system bar at the top of the screen. So far I have been creating my app with the system bar (and the activity bar) completely hidden, but since it is there for real I want to add it eventually. I tried a little bit one day to figure out how but didn't get very far, and then I had an idea which I thought would be funny - maybe I could make static images of an iPod-style system bar, using maybe five or so varying images which the differences being the battery life and Wi-Fi signal strength, with the joke being the further you click into the app the worse the battery and Wi-Fi would be (or seem) because they are pretty notorious at work for those things. I will probably honestly go with whichever is easier however, because by the time it's actually incorporated I will no longer be at that job so I'd be the only one to get any humor out of it haha.
  3. Greyed-Out Sections:  At the top of certain screens, any of them that have a large button to use the scanner, the background behind the button is grey as opposed to the standard white everywhere else in the app. I'm sure it's easy, but I still haven't exactly figured out a way to make that happen. I think I will have to create a "container" of some kind and make its background grey, and then place the button on top.
  4. Borders:  It seems like there would be a simple option to toggle borders on or off around things like buttons and EditText fields and the like, or a simple way to design/create them. Instead I think I will have to learn how to use a work-around to produce them, which I still need to do.
  5. Appearing Buttons:  The next thing I might look into (despite being fifth on this list haha) is how to make a button show up after a certain action. There is a certain screen which requires you to input (or scan) something before you can move on, so right now my screen lacks the "OK" button to move on because I want it to be realistic and only appear when it should.
  6. Return to Top:  As described in the previous post, there are "return to top" buttons on the main activity screen which I have added, but do not have functionality yet.


Of course, I will chronicle any major steps taken in regard to any of these in the future.

Lastly, you may recall the issues I had with my Samsung Galaxy Alpha that I mentioned in an earlier post. It seemed as though doing the standard troubleshooting measures of factory resetting combined with booting in safe mode cured it, as I eventually disabled safe mode and one by one restored my old apps that were wiped out by the reset. Alas, the issues returned, and I swear it happened any time Facebook would update. I still think Facebook is somehow the culprit as it always seemed to be the app I was using or the app that was or had recently updated when the issues returned (It was okay for probably a month or more, and then once every month or two since then it has messed up again, to which I'd boot in safe mode which would seemingly make it go away). It's such a strange thing because all of that info seems to indicate that a third party app is at fault, but the issue itself (screen messing up, things turning green, etc) seems more like a hardware malfunction. Maybe it was simply overheating due to a particular app, and would eventually ruin it for good... except the solution I've come to for this, sadly, is to use the warranty on the phone to get a replacement. I will update again when I know what kind of phone that will be. It does suck though, because I've really liked everything else about this phone :/.

Replica App: An Interesting Small Problem

I just ran into an interesting problem, one which is very small, but I think it's a perfect example to use to make a post about, so I thought I'd write it out.

In my Replica App project, where I'm trying to replicate an app I use at work because it looks super simple, it has a "return to top" button on it's main menu, which is my main activity and a ScrollView. That is the problem: how do I make an onClick event to simply return the ScrollView to the top of the page?

What I'm thinking is, there's probably a way to have it just refresh the current activity, or reload it so that it will reset it to default - the top.

-----

I started this post on 10/26/15, and in the two weeks plus since then, I've put this issue on the back burner and have been adding and working on other areas of the app.  I did run the problem by my brother though, who mentioned he might have had to do something similar in our simple text-based game, Blood Touch.  He was going to help me find it and figure out how to apply it to my app, but he's been really busy at his regular job so we haven't had time.

-----

It is now months later, and the interesting small question remains unanswered. We both had been very busy with work, and other distractions kept us from finding the solution, but the truth is it just isn't high priority, so when I have worked on it, I've been more obsessed with making progress and getting content into it than working out all the little kinks. It sounds like that might be a smart way to approach it anyway, according to my brother, because he says it is easy (for him at least) to get to caught up on little details to the point it impedes his progress. Although it is a small feature, I will want it to function eventually so I will come back to it.

Wednesday, October 7, 2015

News For BT and Replica App, Breaking News For My Phone!

Shortly after I wrote and published my last post, I spoke to my brother and there was some uncertainty as to whether or not we should finish Blood Touch, the simple text-based game we've been working on for awhile.  The main concern was that we had decided to cut out quite a bit in an effort to simply finish the silly thing and release it on Google Play.  Both of us are the perfectionist types, and didn't want to release something - even something we expect would get very few downloads - that didn't meet up to our initial idea for it.  It would feel like we released part of a game idea we had, and that wasn't good enough.

So while I saw his point, I really hated even more the thought of working on something like that (and our first joint effort together) to all be for naught.  So we've basically decided on a compromise.  The game still won't be as long as we originally planned, but we are going to add more and make sure the story is complete--bottom line being that production has begun on that little guy again!  My brother has already made several very needed tweaks, including in the battle system.  There's still some fundamental stuff to work out, and then many more "monsters" and some other content to be added. But we are getting going on that again, so I'm excited about that.

For those of you following along post to post, the Gradle issue I mentioned last time is still unresolved for now.  The idea there is to carry on finishing BT, after which my brother will update his own Android Studio and such, and then see if that somehow messes his own BT files up - but we're expecting that whatever is different on mine, is because mine is upgraded and his is not, but when he updates it will update his files however necessary to keep it all working properly.   So, if it still works on his after the update, he can copy and give me the files then when we're on the same page with updates and it should work.  But that's pretty far down the line, so we've just put a pin in that one for now.

Then there's my replica app project, which is coming along slowly but surely.  I've got the launcher screen and main activity looking about right, minus the fact I still haven't figured out the border on a passcode field issue.  The Main Menu (main activity) screen now has a couple icons/buttons on it with images that I like and are almost good to go except maybe still a little too big. Then there's corresponding activities that those buttons connect to, and the start of the layouts for those screens.  There's a couple tricky issues I've run into on one of those screens, where I need to replicate a screen-wide button at the top, but it needs to be over a grey field which only occupies a top portion of the screen.  Then there's a little notification message that pops up in the real app to tell you if the scanner accessory is connected or not, I'm going to have to figure out how to simulate that.  Also that screen will have more editText fields where the user can click into the field, put it a numeric value, and then (eventually) click an "OK" button to move onto the next screen.  Again, the border and alignment bit of that is being tricky, but I'll get it there.

Lastly for this post I want to mention, mostly for my own documentary purposes, that my phone started acted crazy this past Sunday, October 4th, 2015.  I am really bummed by this because I have absolutely loved this phone so far.  This display/screen sometimes goes nuts, doing all kinds of crazy stuff.  The phone itself seems to be ok, and reacts normally as if nothing is wrong.  It's not lagging or slow.  It recognizes touches and stuff, but because of the screen messing up, it's hard to press what you wanna press or work with it.  I guess sometimes it has been so bad the screen will be mostly black (but on), or a really dark blue or something, and unresponsive.  So I don't know what happened to cause this, I haven't dropped it hard, it's gotten hot at times but nothing too abnormal and not recently.  I'm going to take it back to the store today and see what they say, I'm sure I'll mention next time what happens there!

Wednesday, September 16, 2015

The Gradle Issue and Replicating a Real-World App

Well, we've had an interesting month so far.  I might move back to Texas in a few months, perhaps sooner, or perhaps not at all, but whichever way all of that goes I still plan to try to learn this stuff. So here's what's been going on:

Blood Touch, sadly, still has not been released.  Life tends to get in the way of the more extracurricular things sometimes, such as making games on the side of your day job.  This is more-so about my brother who as I mentioned is handling all of the actual programming for the game.  It's come so far and is pretty close, but still has a few fairly fundamental things we'd like to implement before release, but his job keeps him busy and was especially hectic during August, and now he's been away from it for a little while so there's always the matter of getting back into the zone with things as well. No big deal though, it will get done and released, and I remain very excited about it; my hopes really aren't too high on it actually making us money or anything, but it will be the first game put out into the world that I contributed to, and I am very curious to see what it does.  Any amount of downloads or especially feedback, I will find extremely interesting.  So again, I will update when that releases!

Speaking of Blood Touch, I also mentioned last time that my brother was going to send me the code for it, so that I could mess with it and figure out what is doing what, and tweak it around and maybe slowly turn it into my own thing, just as practice.  Well, we did do that maybe a week or two ago, and we actually ran into a problem straight away, which is one of my (and his) current hurdles, which has to do with Gradle.  We think the problem lies in that I have been updating my version of Android Studio, and he has not.  He copied the code to a hard drive, and I copied it onto my laptop.  Somehow though, that has rendered it useless as far as the Gradle build is concerned.  It's been several days now since we tried to fix the problem, but even after four or so hours of trial and error, we still have the error.  So I do have the project on my computer, and I can look at the code and try to put two and two together, but I can't actually run the app to be able to change things around and see what happens, or anything like that.  I think our plan there is to go ahead and finish Blood Touch first, release it, copy the code, then my brother will update to the latest version of everything and see if that automatically updates Gradle too in some way that keeps everything in line and working together properly.  Then if after the updates, his still works fine, we'll re-copy the code and put that on my computer and hope it solves it.  Otherwise we'll just have to research some more to see what's going on.

The other project I mentioned working on last time, revolved around an app I have to use at work frequently.  I have started that, and have the main couple of screens/activities laid out.  I have the launcher icon looking the way I want (replicating the real one), and the initial boot screen from the real app that requires a passcode be entered.  It has the basic idea in place, but still needs work to really be replicating - for example, the real app obviously requires a specific passcode and will tell you an incorrect one was entered if you try to tap the "OK" button to enter the app's main screen.  So far on mine, there is not even a border surrounding the passcode's text field, or "editText view" to be more Android specific, and you could click "OK" to continue to the main activity whether you enter a number or not.  I do have the passcode field limited to three numeric characters as it really is, but I still have more of those kind of touches to figure out how to add that it needs to be more authentic.
The main activity on the real app basically just has some text citing the version number after "Main Menu", and then a bunch of small icons arranged three across and four down in a grid before the Main Menu title bar repeats itself, and another group of 12 icons appear below that, which repeats a third time.  The third group may or may not have 12 more icons depending on which version is running, but still, there are roughly 36 icons on the main menu screen which act as buttons to open various portions of the app, most of which use the scanner I mentioned last time to scan a product and bring up information or move inventory around.  At work, I use maybe half a dozen of these very regularly, and most I have never touched.  So my plan is to replicate the ones that I use and know, and just simply have the icons for all the others on the main menu screen, but no actual button to them.  As I'm quickly learning though, this still requires a lot of work and activities.  The reason I'm going into this much detail is so you have an idea what it is exactly I am trying to do, but the point of this whole paragraph is to touch on what I brought up last post, about the fact that I was dealing with more layout type stuff as opposed to actual Java programming code.  The thing is, I am making this replica app in Android Studio, and again I find myself (so far at least) mostly dealing with the layout, and look and feel of the whole thing (font color and size, image sizes, etc) and only have a couple of buttons so far that connect activities - I have the launcher activity with the passcode which opens up the main menu activity, and then right now I just have my first little icon on the main menu which does act as a button to open up one part of the app, and a screen for that.  As far as I can tell though, this whole project/idea will really still just be about laying it out to look right, and a couple buttons to connect activities, so it still seems I'm not delving into straight Java code with this project either.  I still think it's okay and worth doing, I want to see how close I can resemble this app because now that I'm learning this stuff, I find myself at work thinking this app looks so basic and simple.  And the company I work for is fairly big, so I know the developers got paid very well to make this app for the company to use - yet here I am thinking I could handle something like that myself, just starting out haha.  There is much more to it than I'm giving credit, like network connectivity to connect it to a server and keep all this information in a database, and things like that that I wouldn't have the first clue about.  This really is just an experiment for practice and to see how close I can duplicate what I see in this example of a real-world app, so I will keep at it and continue to update my progress.

Sunday, August 9, 2015

Text-based Games and the Future

I just wanted to do a quick update since it's been a little while, been a bit sidetracked lately with a book editing project I'm doing as well as helping my brother to try and push out a text-based game for Android on Google Play called Blood Touch (look for it soon!).  While that is in Java, he is handling the coding and I am simply helping with content, coming up with "monsters" and stats and numbers for him to add to a JSON file.  I've done very little video tutorials as of late, but have recently started to try and pick that back up and mess with Android Studio again.  My brother also plans to send me the code for this simple game so that I can mess with it and try to understand the various pieces and activities and concepts, and figure out what is doing what.

By the way, this "simple" text-based game is way more complicated than either of us thought it was going to be. There is a lot to it and a lot he had to research and figure out, but then again that is what he says the essence of programming is all about basically.  All of this will be a great stepping stone going forward, which was a major point in making this game. Don't get me wrong though, he also loved these games growing up and enjoys playing them (and I have really enjoyed testing it and helping him with tweaks and additions and testing it again and again), so there is the whole nostalgia aspect as well, and a genuine like for it.  We are both perfectionists, so it's hard for us NOT to put 100% into something we do, sometimes to a fault.  This game may not impress anybody and may not garner much attention, but it certainly is not half-assed nor seen as JUST a learning experience.

Anyway, the latest news in regards to my learning Java: my brother feels as though the Android Studio courses and videos I've been watching may not be as beneficial to me at this point, because they are focused so much on Android features and things like XML layout files, or Gradle build files, or Android widgets and the such.  He thinks I should practice with more straight Java code, hence why he wants to send me this Blood Touch project to play around with. I also have an idea to try to mimic a simple looking app that I have to use at my "regular" job all the time.  It's very basic white screens with black text, with buttons to access the various parts of the app. At work, it runs on iPods with a scanner attachment that we use, with it's main purpose to keep track of inventory. Obviously I won't have a scanner to actually activate, but I feel like I could at least make all of the different screens and replicate everything else about it, just to see if I can. So that's kinda where I am right now, a little disappointed that I've been away from the tutorials for a few weeks after I was making such good progress for a chunk of time before that... but I am very excited to be this close to having contributed to something that will soon be on Google Play, I will probably come back to this post and add a link to it, so again look for that in the future!

Thursday, June 25, 2015

Steady As She Goes

Another hurdle I had previously, was how you take an idea and make it a thing.  Bring it to life. Where do you even start, basically.  How do you know what all you'll need to make it happen?

After more videos though, I'm starting to get the picture.  I'm beginning to understand the idea of a "life cycle" for an "activity", and how to use .xml files to create layouts for basic screens.  I get the idea that every screen is an activity, and that you can pause it, stop it, destroy it and so on.  I'm still nowhere near taking an idea, especially for a game, and turning that into anything on my own, but I feel like I can at least make a basic screen that says something, haha.  It is a start.

I also thought I'd mention that we made the switch from using the Eclipse IDE to Android Studio, in light of learning that Google would no longer be supporting the Android Developer Tools (ADT) plugin for Eclipse.  So far, we're both liking Android Studio, I don't think either of us (my brother or I) have any major issues or dislikes with it.  Honestly to me it looks and feels pretty similar to Eclipse, and I'm learning it little by little as I go just as I was with Eclipse.

Other than that, it's been pretty steady as she goes lately. I've been working on a few various tutorial apps with following these videos, from Hello World ones to playing with different layouts, and a basic registration form, all while testing on my phone and an emulator.  I guess my next challenge would be simply figuring out how to make things like buttons work, and opening up new activities from a Main Activity.

Saturday, June 6, 2015

Learning Java: The First Post

For this first post, I'm going to try to backtrack a bit and mention a couple of the first things that crossed my path in this journey since I had considered making this blog for awhile before actually doing so.

So my main regimen to learn Java, has been to watch tutorial videos online and with the help of my brother who is a programmer, though he is just now learning Java as well.  For the videos, I mostly use a site called lynda.com, which has really great tutorials.  My brother has found some good videos on YouTube as well, but for now, for learning the main core idea and getting started, that's mostly where I go.  At first of course, it's pretty simple, and guides you through installing the JDK and JRE, as well as an IDE, which at first I was using Eclipse, as the videos were too.  As is the norm, the first program it has you create is a "Hello, world!" program.  No problems there.

The first real problem I recall having, is just that I had a disconnect trying to figure out how typing in code and creating classes and objects, converted magically into images.  The next project the videos worked on, used the example of creating an olive press to crush olives and produce olive oil.  So I could see the code and the logic and all that, but how, when and where does it go from simply having it output text that says "You crushed 2 olives and got 4 units of olive oil" to an image of a press and oil?  I think I understand now that you would use different means to accomplish that, what we plan to do for example is use libGDX.  I have also previously dabbled with programs like Blender and Unity, but doing Java from scratch is kinda a different animal.  So I guess I see you would import images and the like, and the code will just dictate how they act.  Still, "rendering" and manipulating 3D images and objects is still a bit over my head, but that's for another day.