Announcement

Collapse
No announcement yet.

Simple Android App

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Simple Android App

    I created a shoutcast player with all the rockradio.com stations hardwired in.

    facts:

    1) It's main function (playing shoutcast stations) works fabulously
    2) the gui is horrible
    3) I made this in 5ish hours
    4) this will look even worse on a tablet than it looks on a phone but it will work the same.
    5) yes I know that android devices dont use scrollbars...live with it. I made it super big just for you.
    6) no ads no bullshit, just music

    how to install:
    1) Navigate to this page on your android device
    2) press the link that applies to you, it may bring you to the zippyshare page, if so click the big orange download button in the upper right. At the bottom of the screen it will warn you that my file could harm your android and you will be asked if you still want to download. My file will not hurt your android. You may even get another page asking you to download mprotect. That is a pop-up and I personally would not download it. Close the pop up and select ok for downloading my file. I would never make malware. I intend to be an android developer for a living. Pissing people off is not a good way to start that. This little app is mostly just a fun test run, maybe you will enjoy it.
    3) once the file is downloaded go to APPS and open Downloads
    4) select the file you just downloaded and choose "Package installer" when prompted
    5) follow the on screen directions to complete the installation

    alt install:
    1) download the link to your pc/mac/linux that applies to you
    2) if you have the usb drivers installed to your computer for your android device you can easily usb tether your device to your computer and drag/drop the file to your downloads folder.
    3) follow steps 3,4 & 5 from above

    I have Adobe AIR on my android device:
    swim.apk 1.6mb

    I do not have Adobe AIR on my android device:
    swim2.apk 10.5mb

    how to use:
    go to APPS and find swim, touch it. When loaded select a station on the right, wait a second-ish for buffer and enjoy music. To change stations just select a different one. To completely kill the app go to open tasks and swipe it away.

    list of rockradio.com stations you get with this app (40)
    60s rock, 80s alternative, 80s rock, 90s alternative, 90s rock, beatles tribute, black metal, blues rock, classic hard rock, classic metal, classic rock, death metal, deathcore, grunge, hair bands, hard rock, hardcore, harder rock, heavy metal, indie rock, industrial, jam bands, melodic death metal, metal, metalcore, modern rock, nu metal, pop punk, pop rock, power metal, progressive metal, progressive rock, punk rock, rap metal, rock ballads, screamo-emo, ska, soft rock, symphonic metal & thrash metal

    other stuff
    if my super big scroll bar does not seem to respond well for you, you can also scroll by just touching the scroll track where you want the thumb to be. Wherever you touch is where the top of the thumb will go. I have the intention to visually and functionally upgrade the app but for now it is what it is.

    The program is designed to make multiple attempts to connect to a station. In the event that it completely fails it SHOULD (!= will) give you a message saying that the station is experiencing difficulties and you should choose a new station. In the event that you choose another station and it doesn't seem to be loading either, it is safe to assume that the app has softly crashed. An app restart should fix it right up. In multiple tests across 7 completely different devices it refused to play anything about 2% of the time. In other words, it's pretty damn stable but, it is not flawless. Honestly, I have no way to determine how much of that 2% was station problems that have nothing to do with my app. If music doesn't load in 2 or less seconds, you can be sure its fighting for a connection (which it may get).

    The app will still play music if you navigate away from it. Just like pandora my app will "hush" when you are getting a call or message. You will not hear the call or message tones, you will just stop hearing music for the duration those tones play. My app does not crash when your phone comes out of sleep mode. If it was the last thing on the screen it will pop right up as if nothing ever happened as soon as you swipe. In other words it is very persistent. If you don't swipe it away in tasks it will never stop playing.

    Use your built in volume to control the volume. If you have a device with volume buttons, those work too.

    I have AIR vs I don't have AIR
    AIR weighs 35mb (after install) and can be downloaded for 100% free in every way from google play store. If you don't have AIR then you also probably have no reason to get it. My "have AIR" file is very small but AIR is not. My "dont have AIR" file is substantially bigger than the other because a captive runtime is included so you don't have to get AIR. It's "stand alone", "portable" or however else you would like to describe it. The difference is:

    35mb + 1.6mb and the ability to run other AIR apps
    or
    just 10.5mb and you're done

    for mush heads
    This will not run in any way on anything but an android device or a computer with the proper android sdk packages installed. So, no this will not run on your IPhone (but I could make a version that would with little more than a click - I have no such device to test it on though)
    Last edited by MadGypsy; 06-27-2014, 11:07 PM. Reason: sorry so many edits. I wrote wrong stuff and also found easier ways
    http://www.nextgenquake.com

  • #2
    I don't have a software update at the moment but, I have an information one.

    change log:
    1) added 30+ stations
    2) fixed a buffer overflow that oddly wasn't present on Android but was causing trouble in Winblows. (currentSound.close() before starting a new sound works wonders for that shit)
    3) unbloated the package. I have no idea how much I removed from the overall app size (cause I'm just running a debugger) but I removed a bunch of useless crap

    Currently I have 2 entire servers worth of stations - RockRadio.com and SomaFM.com so, now I want to remove my one big list and turn it into 2 big lists that are instantiated depending on which station you choose from yet another list. like:

    stations (pressed)
    |_Rockradio
    |_Soma FM (pressed)
    ....|_station 1
    ....|_station 2
    ....|_station 3
    ....|_etc

    Thing is, I want this to be very dynamic so, as I add stations, the menu just figures it all out and builds itself accordingly. None of this is XML. I wrote a parser (are you surprised?) that gets all the .pls files from a directory structure that will mock the menu. It then parses the entire thing into an array of objects and gets saved as encrypted bytes. The only thing that actually loads when the app starts is the encrypted byte file which has all of the necessary info ready to go and organized into the proper heirarchy (completely eliminating the original directory structure and it's files). Where my datagrid gets tricky is, I have an entire 3rd server that has multiple genres of stations and that will add another layer to the list (datagrid)

    stations (pressed)
    |_I FORGET THE NAME(pressed)
    ....|_rock
    ....|_country(pressed)
    ........|_kicking country
    ........|_80s country
    ....|_like 10 more
    |_Rockradio
    |_Soma FM

    However, I'm not messing with any of that at the moment cause I just about figured out how to record streams. It's a bit messy. I can't actually save it as a real mp3. I have to save it as mp3 bytes (ie a possibly incomplete or overly complete mp3) and then I can reopen those bytes and read it as if it were a proper mp3. This is highly experimental (for me) and I'm not really sure how to deliver the system without it seeming/being hokey. I could go from wav to mp3 but it bloats the fuck out of it and it hangs for a long time cause, well, IDKWTF I'm doing (lol)

    Anyway that's the basic gist of what can be expected in the update. More Stations a better menu and maybe the ability to pirate streams. Oh and no more scrollbar. Due to the fact that swipe scrolling will provoke a press on whatever button is under the beginning of your swipe (or if I listened for up events, wherever you end your swipe) I resigned myself to scroll buttons at the top and bottom of the menu. If someone has a better idea I would love to hear it.

    note: I already thought about a "dead space" for swipe scrolling but that's too restrictive and really no different than having a scrollbar. My app is already designed to fit any screen size so some other method that doesn't involve scrolling the list (ex pages) would be kind of dumb and space consuming. It would also be slower to navigate.

    more about datagrids:

    The datagrid is nothing but a descending list of buttons and every button but the most ultimately nested ones have to trigger the displaying of another datagrid. Maybe this won't be that complicated. The overall condition will be something like:

    if (this button does not have a child) play stream
    else show child

    so:

    parent
    |_inner parent (parent replica)
    ....|_inner parent (parent replica)
    ........|_child (instance of parent replica asset [button])

    meaning I only have to build the first parent and then teach my program how to cascade a nesting of that parent. Time to upgrade the parser.
    Last edited by MadGypsy; 06-30-2014, 09:10 PM.
    http://www.nextgenquake.com

    Comment

    Working...
    X