Android Question Best approach for a simple crypto price alert app in B4A?

Maplecccoin

New Member
Hi everyone,

I am planning to build a small Android app with B4A for personal use. The idea is simple: track a few crypto prices and send a notification when the price reaches a target level.

I am still thinking about the best structure. The app would probably need:

  • a simple watchlist screen
  • price data from an exchange or market API
  • local target price settings
  • background checks every few minutes
  • push or local notifications when the target is reached
For example, I may track BTC, ETH and some trading pairs I usually watch on platforms such as Binance, Bybit or BYDFi. This is not meant to be a trading bot, just a basic alert tool.

My questions are:

  1. In B4A, what is the best way to run periodic background checks without draining too much battery?
  2. Should I use a foreground service, receiver, or another method?
  3. Is it better to store alert settings locally with KeyValueStore or SQLite?
  4. Any recommended pattern for handling API errors and rate limits?
I would appreciate any advice from members who have built similar notification or market tracking apps in B4A.

Thanks.
 

Peter Simpson

Expert
Licensed User
Longtime User
Welcome to the community @Maplecccoin .

I have my own app for S&S (not crypto). I personally have an online account that allows me access an API.

My app interacts with the API at set times and pops up alerts when certain criteria are met or set changes happen. You can just use HttpJob to call the API, then process the data accordingly. For on-device storage of data, I personally prefer to use KVS.


Enjoy...
 
Upvote 0
Top