Bitcoin Forum
July 25, 2024, 03:56:57 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: New Android App - uses streaming data not polling for live prices.  (Read 1472 times)
ragmondo (OP)
Member
**
Offline Offline

Activity: 106
Merit: 10



View Profile WWW
May 01, 2013, 09:52:47 AM
 #1

I'm the dev. It looks like crap as there are already 100 other "mtgox price" apps out there - but the difference is this one is streaming data via message queues - ie it doesn't get the whole socket.io data but just the mtgox_ticker data.

Here's the link to the app:  https://play.google.com/store/apps/details?id=info.getbitcoin.bitcoinlive

And here's a quick youtube comparing it to bitcoinity.org: https://www.youtube.com/watch?feature=player_embedded&v=KUr-JxJI_Cw


If it's popular, I'll make it look prettier . I can even release a jar to other android devs that hook straight into the subscription datastream so to add live prices to your app, it's as simple as including the jar and the following code:

 private void startSubscriber()
    {
        Handler h = new Handler() {
            @Override
            public void handleMessage(Message msg) {
                String d = msg.getData().get("message").toString()    ;
               // Log.d(Tag, d);
                String d2 = d.substring(d.indexOf(" ") + 1);
                try {
                    JSONObject jObject = new JSONObject(d2);

                    String ask = jObject.getJSONObject("sell").getString("display_short");
                    String bid = jObject.getJSONObject("buy").getString("display_short");
                    String last = jObject.getJSONObject("last_orig").getString("display_short");

                    TextView ask_text = (TextView) findViewById(R.id.btce_ask_value);
                    ask_text.setText(ask);

                    TextView bid_text = (TextView) findViewById(R.id.btce_bid_value);
                    bid_text.setText(bid);

                    TextView last_text = (TextView) findViewById(R.id.btce_last_value);
                    last_text.setText(last);

                } catch (JSONException e) {
                    Log.e(Tag, "Exception", e);  //To change body of catch statement use File | Settings | File Templates.
                }

            }
        };

        zmqt = new ZeroMQMessageTask(h,"tcp://betadata.getbitcoin.info:5565","mtgox_ticker");
        zmqt.execute();


    }

The prices are filtered and streamed from an AWS instance - which won't be free if it becomes widely used .. so I'll have to figure out how to make an income enough to cover those costs (which won't be significant).
MrCrabs
Full Member
***
Offline Offline

Activity: 121
Merit: 100



View Profile
May 01, 2013, 10:24:43 AM
 #2

Nice one .

Fit it into a 1x1 square.

That disables the phone to do a screen fireworks display every
time BTC rises by $5.

And your on to something.

Keep up the good work. Smiley Smiley Smiley
ragmondo (OP)
Member
**
Offline Offline

Activity: 106
Merit: 10



View Profile WWW
May 01, 2013, 11:16:50 AM
 #3

Nice one .

Fit it into a 1x1 square.

That disables the phone to do a screen fireworks display every
time BTC rises by $5.

And your on to something.

Keep up the good work. Smiley Smiley Smiley


It took me a few moments to parse what you were saying then. I might combine it with cloud push as well (so the app doesn't have to be running) but I'll see how popular it is first.

I'd rather just give an API to other devs so we can do some kind of rev share. My UI dev skills are a bit .. lacking.
ragmondo (OP)
Member
**
Offline Offline

Activity: 106
Merit: 10



View Profile WWW
May 02, 2013, 08:26:21 AM
 #4

Apologies for anybody who saw the service stall last night - part of the server process ran out of resources but I've amended that bit now.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!