Pages:
Author

Topic: How to build a Hive app (introducing the Hive app API) - page 2. (Read 28640 times)

sr. member
Activity: 378
Merit: 325
hivewallet.com
Maybe some trading methods?

I did something similar with phonegap here:

https://bitcointalksearch.org/topic/collab-for-phonegap-app-for-btc-e-135392

Neat! Would you be interested in porting that to a Hive app? We'd love to get some BTC-E action in there!
legendary
Activity: 965
Merit: 1000
Maybe some trading methods?

I did something similar with phonegap here:

https://bitcointalksearch.org/topic/collab-for-phonegap-app-for-btc-e-135392
newbie
Activity: 3
Merit: 0
Hello!

My name is Paweł and I'm working on few stuff for Hive Wallet.

http://cl.ly/image/0Y3N3G1y3S3l/Zrzut%20ekranu%202013-12-08%20o%2021.51.06.png

Basic functionality has been implemented. What else would you like to see here?

Greetings from Kraków, Poland!
full member
Activity: 145
Merit: 100
┗(°0°)┛
A few updates for Hive app developers:

  • apps now run on http://app_name.hiveapp/ instead of http://localhost/app_name - this was changed to prevent apps from reading each other's cookies (but if possible, please don't hardcode the address, just take it from location.href, as we may need to change it again in the future)
  • you can now safely use cookies to persist data between sessions (just remember to set a persistent cookie, not a session cookie, i.e. with an expiration date set)
  • localStorage does NOT work properly right now and you should not rely on it
  • there are bitcoin.VERSION and bitcoin.BUILD_NUMBER properties if you need to check the Hive version
  • if you are relying on the fact that Hive disables origin policy check for XHR requests, please don't do that - we'll be removing this in the future (and there will be an API method added instead that will proxy the request for you)
 

Also, a few things you might not be aware of:

  • Hive has a Webkit inspector enabled, so in any app you can right-click and choose "Inspect" to get access to the JS console
  • for easier development, you can replace an archived app bundle in ~/Library/Application Support/Hive/Applications with an unpacked directory with the same name, and the app will work exactly the same
member
Activity: 98
Merit: 10
I'm working on an app for Dabs' charity based on Seans Outpost
full member
Activity: 142
Merit: 100
Hive/Ethereum
Hi, I'm just trying to get my head around what this is, and I'm sorry I haven't read too much yet. As I understand it, the hive app is an app which is or will be a bitcoin wallet, but also offers an API for people to create their own bitcoin related games which can be played with the bitcoins in the users wallet. Is that right or am I way off?

Hive is a Bitcoin wallet for Mac OS X Smiley

Hive wallet also has a API, allowing developers to build apps that live inside the wallet itself, making it easy for Hive users to interact with Bitcoin services directly. Since it's HTML/CSS/JS-based, anything that can run in the browser can be an app.
member
Activity: 98
Merit: 10
nearly dead
Hi, I'm just trying to get my head around what this is, and I'm sorry I haven't read too much yet. As I understand it, the hive app is an app which is or will be a bitcoin wallet, but also offers an API for people to create their own bitcoin related games which can be played with the bitcoins in the users wallet. Is that right or am I way off?

Any kind of app, as long as you can do it using javascript, html, and css. It is just a webkit browser embedded there.
full member
Activity: 182
Merit: 100
Hi, I'm just trying to get my head around what this is, and I'm sorry I haven't read too much yet. As I understand it, the hive app is an app which is or will be a bitcoin wallet, but also offers an API for people to create their own bitcoin related games which can be played with the bitcoins in the users wallet. Is that right or am I way off?
full member
Activity: 145
Merit: 100
┗(°0°)┛
Uhm I just said it was, right in the last comment. You need an API for letting the apps access the locales, obviously you won't pass the entire files on every application start.
Ok, now I'm confused, but anyway here's what we're planning:

- there will be locale information in the JS API, so the app will be able to check if the whole UI is displayed e.g. in French or in German, and if it includes its own translations for its labels inside the app bundle, it can use some kind of JS i18n library to change the language of the labels

- there (probably) won't be any API that passes any specific translated strings from Hive to the app through the API, because I think there's no way we can prepare any generic set of labels that would be reusable in any significant amount of apps and would cover all copy needed in those apps, and that would probably be more work than it's worth anyway
member
Activity: 98
Merit: 10
nearly dead
The apps can already be localized, it is a matter of having a menu inside the app where the user can pick some other language, and obviously the app needs to provide such translations. Passing the current language is unneeded, as it is already available through navigator.language in javascript. If navigator.language doesn't reflect the current language, then that should be an issue by itself.

It looks like that comment is after some method for sharing the translations already available for Hive, so the apps can reuse them as much as possible. No amount of translations will ever be enough for all the possible apps, but some of the common translated strings could be reused and at least reduce some trivial effort on the translations there. I'm not sure if this actually helps, as it might induce to apps half-translated which doesn't improve the user experience.
No, it wasn't about passing any actual translated strings from Hive to apps, that wouldn't make much sense as you say.


Uhm I just said it was, right in the last comment. You need an API for letting the apps access the locales, obviously you won't pass the entire files on every application start.
full member
Activity: 145
Merit: 100
┗(°0°)┛
The apps can already be localized, it is a matter of having a menu inside the app where the user can pick some other language, and obviously the app needs to provide such translations. Passing the current language is unneeded, as it is already available through navigator.language in javascript. If navigator.language doesn't reflect the current language, then that should be an issue by itself.

It looks like that comment is after some method for sharing the translations already available for Hive, so the apps can reuse them as much as possible. No amount of translations will ever be enough for all the possible apps, but some of the common translated strings could be reused and at least reduce some trivial effort on the translations there. I'm not sure if this actually helps, as it might induce to apps half-translated which doesn't improve the user experience.
No, it wasn't about passing any actual translated strings from Hive to apps, that wouldn't make much sense as you say. This is specifically about passing info about the locale currently used in the app. I haven't thought about navigator.language, that can probably be useful for now, but I'm guessing it doesn't always reflect the Hive locale exactly - especially if Hive doesn't currently have a translation for the language you've chosen in the system preferences.
member
Activity: 98
Merit: 10
nearly dead
Adding idea of passing the system language to app platform:
https://github.com/hivewallet/hive-osx/issues/111

It looks like that comment is after some method for sharing the translations already available for Hive, so the apps can reuse them as much as possible.

Yes.
sr. member
Activity: 294
Merit: 250
Adding idea of passing the system language to app platform:
https://github.com/hivewallet/hive-osx/issues/111

The comment linked in that issue seems to suggest more than just passing the current language.

The apps can already be localized, it is a matter of having a menu inside the app where the user can pick some other language, and obviously the app needs to provide such translations. Passing the current language is unneeded, as it is already available through navigator.language in javascript. If navigator.language doesn't reflect the current language, then that should be an issue by itself.

It looks like that comment is after some method for sharing the translations already available for Hive, so the apps can reuse them as much as possible. No amount of translations will ever be enough for all the possible apps, but some of the common translated strings could be reused and at least reduce some trivial effort on the translations there. I'm not sure if this actually helps, as it might induce to apps half-translated which doesn't improve the user experience.
sr. member
Activity: 378
Merit: 325
hivewallet.com
Adding idea of passing the system language to app platform:
https://github.com/hivewallet/hive-osx/issues/111
member
Activity: 121
Merit: 14
I've released my app for satoshirat, it's in your repo, and i've done today a major update.

check it out.

Oh wow, we totally missed this, sorry yellowdog!
https://github.com/hivewallet/hiveapp-satoshirat

Can you please post a screenshot here so that it stands out more?

Thanks!

Some pics, thx!





sr. member
Activity: 378
Merit: 325
hivewallet.com
I've released my app for satoshirat, it's in your repo, and i've done today a major update.

check it out.

Oh wow, we totally missed this, sorry yellowdog!
https://github.com/hivewallet/hiveapp-satoshirat

Can you please post a screenshot here so that it stands out more?

Thanks!
sr. member
Activity: 378
Merit: 325
hivewallet.com
Thanks for the work on Hive.

I believe this custom useragent is only useful if you start accepting apps that only redirect to a site, are you planning to do that ? Or are you planning to include a mini-browser app inside hive ?

We discourage it of course, but there may be some exceptions. And re: mini-browser app, there is no such plan, no.
sr. member
Activity: 294
Merit: 250
FYI, if you need to detect that the app is opened inside Hive (as opposed to a normal web browser), I've added a custom user agent string - inside Hive, navigator.userAgent will now include "Hive/0.9" (or whatever the version is) at the end. I'd say there should be very few cases where the user agent will have to be checked in code, but it's there if you need it. (This is only available in testing releases now, see GitHub releases page.)

I've also fixed the problem reported by @knowitnothing

Thanks for the work on Hive.

I believe this custom useragent is only useful if you start accepting apps that only redirect to a site, are you planning to do that ? Or are you planning to include a mini-browser app inside hive ?
full member
Activity: 145
Merit: 100
┗(°0°)┛
FYI, if you need to detect that the app is opened inside Hive (as opposed to a normal web browser), I've added a custom user agent string - inside Hive, navigator.userAgent will now include "Hive/0.9" (or whatever the version is) at the end. I'd say there should be very few cases where the user agent will have to be checked in code, but it's there if you need it. (This is only available in testing releases now, see GitHub releases page.)

I've also fixed the problem reported by @knowitnothing:

There seems to be some problem regarding overwriting a running application, which causes the bitcoin object to disappear. I can reproduce this every time by doing the following:

1) Create your app X and run it inside Hive;
2) While it is running, overwrite it (i.e. open myappx.hiveapp and confirm the overwrite);
3) Right click and click on Reload;
4) Right click and click on Inspect;
5) The bitcoin object is gone

How to fix the missing bitcoin object: restart the app.
sr. member
Activity: 294
Merit: 250
interesting
Pages:
Jump to: