Author

Topic: Trying to build an android app that can send bitcoins, possibly store. (Read 1489 times)

newbie
Activity: 53
Merit: 0
I found blockgeeks to be a good site for learning.  They have courses too still I think, although I've never done one.  Smiley
newbie
Activity: 4
Merit: 0
Fair point, and I would be the first to agree with you that I am bad at programming.

However, the only reason I am remotely interested in computer programming is because of bitcoin, and for at least a couple years I have been hoping someone would build the very simple app I am trying to build, perhaps as just a small part of a larger wallet app. Some have come close, but none have hit the target exactly, per se, so I decided to try and build a prototype myself and see if anyone liked it. (And if not, who cares? At least I learned a little programming along the way)

I had thought that an easy way to boost adoption would have been to make it very easy for any arbitrary app to set up a way to do bitcoin transactions so that not every programmer had to build their own wallet. Perhaps I am mistaken? Or i am overlooking something very simple/making a dumb mistake?

In any event I would like some constructive feedback. I really do not want to build a wallet, but i need to use a wallet.

Hey,
Do you able to create android wallet?

newbie
Activity: 22
Merit: 0
Fair point, and I would be the first to agree with you that I am bad at programming.

However, the only reason I am remotely interested in computer programming is because of bitcoin, and for at least a couple years I have been hoping someone would build the very simple app I am trying to build, perhaps as just a small part of a larger wallet app. Some have come close, but none have hit the target exactly, per se, so I decided to try and build a prototype myself and see if anyone liked it. (And if not, who cares? At least I learned a little programming along the way)

I had thought that an easy way to boost adoption would have been to make it very easy for any arbitrary app to set up a way to do bitcoin transactions so that not every programmer had to build their own wallet. Perhaps I am mistaken? Or i am overlooking something very simple/making a dumb mistake?

In any event I would like some constructive feedback. I really do not want to build a wallet, but i need to use a wallet.
legendary
Activity: 1862
Merit: 1011
Reverse engineer from time to time
You are too new to programming to be handling wallets. I think you should gain 1-2 years of programming experience before jumping on the bitcoin wallet train.
newbie
Activity: 22
Merit: 0
Hello everyone! I am relatively new to programming and am trying to teach myself how to build a simple android app. I am building my app using eclipse Kepler, and one of the the last things I need to do is to allow my app to spend bitcoins. The first thing I did was turn my android application project into a maven android application project so I could use more resources. (Am i saying this right? I just needed to be able to import bitcoinj so i downloaded maven and maven 2 eclipse, then added some dependencies)

First, I read that I can integrate my app with an existing wallet, such as coinbases or the schildbach bitcoin-wallet (https://github.com/schildbach/bitcoin-wallet) so I can spend bitcoin out of this wallet by pressing a button in my app, but I cannot figure out how to do this. I tried to follow the sample-android-integration project for the schildbach wallet:

My best guess is to include the following in my pom.xml file, which based on my knowledge should work:


   de.schildbach.wallet
   base
   1



         de.schildbach.wallet
         integration-android
         2.0


When I put the in my pom.xml file, i get the error "Non-resolvable parent POM". Do I even need this?

When i put the dependency in my pom.xml file I get plenty of errors, such as failed to read artifact descriptor, failed to transfer de.schildbach-wallet:integration... , and 26 missing artifact errors. I am getting "Missing artifact:com.google:bitcoinj:jar:0.11.1" Even though under my project in the maven dependencies section i see bitcoin-0.11.1.jar. Does anyone have any idea what I am doing wrong here?

The way I understand it, if I am "depending" on this artifact, I should be able to use the methods in it as part of my project. How far off from the truth am I? Am i doing anything right?



So, after failing at this for a while, I decided I would try to make my own simple wallet using bitcoinj. I just want to create a wallet I can load with a few $ of bitcoin and be able to send the coins to a specified address.

I have been able to create addresses and a wallet, but I need to save the wallet. However when I run the method wallet.saveToFile(File f) I get the following errors:

log4j:WARN No appenders could be found for logger (com.google.bitcoin.core.Wallet).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" java.lang.NoSuchMethodError: org.bitcoinj.wallet.Protos$Key$Builder.setPrivateKey(Lcom/google/protobuf/ByteString;)Lorg/bitcoinj/wallet/Protos$Key$Builder;
   at com.google.bitcoin.store.WalletProtobufSerializer.walletToProto(WalletProtobufSerializer.java:131)
   at com.google.bitcoin.store.WalletProtobufSerializer.writeWallet(WalletProtobufSerializer.java:94)
   at com.google.bitcoin.core.Wallet.saveToFileStream(Wallet.java:468)
   at com.google.bitcoin.core.Wallet.saveToFile(Wallet.java:303)
   at com.google.bitcoin.core.Wallet.saveToFile(Wallet.java:342)
   at Main.main(Main.java:55)

Under maven dependencies I have log4j-1.2.16.jar and slf4j-log4j12-1.6.4.jar. Besides setting up slf4j as a dependency, what else do i need to do to "iniatilize the log4j system properly".

And my final question, will this be a recurring theme? Will different objects/methods I use from bitcoinj require me to set up ever more dependencies and jars?


If anyone has any suggestions, can answer any questions, or can point me to some material i should read, I would be very grateful!!!!
Jump to: