Android Question share list...

ilan

Expert
Licensed User
Longtime User
hi

i need your help (suggestions) please.

i am creating a list in my app and i would like to share it with others. until now i did it with ftp upload and download but i dont like this solution. basically, it is a txt file of about 100 byte to max 20kb.
 

Sandman

Expert
Licensed User
Longtime User
Hi ilan,

You're a little light on the info here...

- What's the problem with the current situation?
- Is the group of people static?
- Is it always a push from your app to the group or do they also edit it?
- Do the group use the file with a special app?
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
you should make a overview diagram (or mindmap) with possibilities and your acceptable solutions.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
Hi ilan,

You're a little light on the info here...

- What's the problem with the current situation?
- Is the group of people static?
- Is it always a push from your app to the group or do they also edit it?
- Do the group use the file with a special app?

the sharing should be between 2 people that use the same app.
you create a list and share it with your friend that is using the same app. so i was thinking of sending a link to the other user or a random number where he can put in his app and download the list (text file)

i dont like the ftp solution because i need to put my password and username in the app and it is very simple to read it.

using push may be a solution but i think there is a limit the push string length.

using dropbox or google drive is only an option if i have a paid account or a small user amount but i plane to have big user amount and no paid dropbox account :)

so what could be a good solution?

for now i am using ftp but i would like to change that.
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
it looks like
user 1 - app - network - server app - network - app - user 2

as server u can use a cheap raspberry mini pc at home with access by a hostname service.
you can send data direct if both are online or you need save the data temporary.

also possible is using a webhosting service with asp.net or php & a database.
it did not cost much.
 
Last edited:
Upvote 0

ilan

Expert
Licensed User
Longtime User
it looks like
user 1 - app - network - server app - network - app - user 2

as server u can use a cheap raspberry mini pc at home with access by a hostname service.
you can send data direct if both are online or you need save the data temporary.

also possible is using a webhosting service with asp.net or php & a database.
it did not cost much.

I like the first solution but have no idea how to do that. I do own a rp2 but how to send data from my phone to the server and back??
 
Upvote 0

Sandman

Expert
Licensed User
Longtime User
Well, considering that your goal is to reach a lot of users, these things are very clear:
  1. You should setup a site on shared hosting somewhere
  2. Get a real domain name and point to your site
  3. On said site you should have a web service to handle the auth, lists etc
I would absolutely not use my home connection, even for a very small number of users. Too much risk for downtime etc, plus unneeded hassle with domain names if/when you decide to grow to shared hosting or VPS somewhere.

Shared hosting
The good news is that shared hosting isn't very expensive. I've used Dreamhost for years for a number of sites and always been happy with them. Read more about Dreamhosts options here. You should pick the Shared Hosting.

Domain name
As for the domain name, it's not really going to be visible to anyone (assuming you don't also put a marketing site there), so you can pick just about anything that makes sense. If your app is called ilanlist, and ilanlist.com is taken, just buy ilanlistbackend.com instead.

Web service
This is where things will hurt for you as I kind of sense you're not into making web thingies. :) You might want to consider finding somebody who can make a simple web service for you, preferably in a very popular language such as php or ruby. This is important as the person who helps you will not be available forever, and when she's moved on to other things you need to be able to pick somebody from a large pool of people who knows the language. It's also somewhat important to pick a good framework, only web people who's in it for the love of pain code without frameworks nowadays. If you're going with php, I would consider Laravel Lumen, and if ruby seems better, just go with Ruby on Rails. There are more options out there, obviously. Regardless if you find somebody or decide to code the backend yourself (using a framework), you need to do the thinking of what's required. Not much difference from the thinking you use when coding B4X. "User needs to authenticate. And get a list of all lists stored on server. And download a list to mobile. And send a list back to mobile. And delete a list stored on server. Etc". A couple of good terms to read up on is CRUD and REST. Both those terms are discussed here in the forum also so you might get a head start using some code examples in here. This is a big field, but the good news is that you only need to grasp a very small part of it, thanks to the simplicity of your app.

Good luck, I hope this helps a little bit :)
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
but have no idea how to do that

to access your rp2 at home you can use a dyndns servive https://www.noip.com this is free but after 30 days you got a mail and need activate with some clicks.

then you must setup port forwarding in router for http its port 80 for https its 443 if you will use just a tcp socket transfer you can use any free port.

at your rp2 you can install java runtime and the server app you can make with b4j (erel just updated it to 6.30,jServer v3.00 is included).
the good thing you can test this app also at your pc.

to work at the raspberry every once in a while i used a remotedesktop connection from pc.

you should begin within a local network and pc-pc or pc-phone data transfer with http requests.

I would absolutely not use my home connection, even for a very small number of users.

yes, it belongs if you have money for web hosting service or not.
if your app make income for you or not.
cheap web hosting have often limited access limited database size limited traffic.
myself using web hosting in germany from 1und1.de but its also wise to be independent.
 
Last edited:
Upvote 0

Sandman

Expert
Licensed User
Longtime User
if you have money for web hosting service or not

True. I made the assumption that ilan wasn't simply planning on giving away the app with no way of making money on it. That said, there's expensive hosting out there, and not so expensive. Dreamhost, as I recommended, cost $8 per month, which should hopefully be cheap enough to make this a non-issue. It's worth mentioning that I've never hit a limit with them over the years, even though I've pounded their databases quite a bit. :)
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
True. I made the assumption that ilan wasn't simply planning on giving away the app with no way of making money on it. That said, there's expensive hosting out there, and not so expensive. Dreamhost, as I recommended, cost $8 per month, which should hopefully be cheap enough to make this a non-issue. It's worth mentioning that I've never hit a limit with them over the years, even though I've pounded their databases quite a bit. :)

i have already a hosting and also some apps using mysql+php db. like Pixel Art Studio.
the problem is that the db is not always updated immediately. it is not a very good hosting (WhoIs.Com)
maybe i will switch to a better hosting provider and use mysql+php for the list sharing.

ps: my webiste is www.sagital.net
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
@Sandman
$8 per month with 3 years contract. if you need Dedicated Hosting its a big price jump :)
i have a cheap windows hosting but i can not use ms management studio to design / edit my sql databases, only via a web tool.
i can backup and download my databases but its not possible for me to design at pc and restore exact this database at web hosting.
its because safety for the web hosting service. had some other time wasting experience but the price per month its worth.
 
Upvote 0

Sandman

Expert
Licensed User
Longtime User
i have already a hosting and also some apps using mysql+php db. like Pixel Art Studio.

Well, in that case it seems you already have somebody near you that knows about this. Just use that person again and go for it. :)

And it sounds nuts that the database isn't updated right away. Just change already. Don't forget to set a very low TTL on your DNS pointer to avoid downtime when you do the actual moving.
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
better hosting provider
you can choose between ms or linux hosting.
i not like php, i used ms visual studio at pc for web api / web service / web forms, just one click and the app is published.
but my trouble was that i can not access my database from pc at home at web hosting, so i need a db copy at pc for development.
 
Upvote 0

Sandman

Expert
Licensed User
Longtime User
$8 per month with 3 years contract.

Yep, true. And $11 per month if you pay per month. Still, it's only $11. Why are we even talking about this? Surely this can only matter if you're absolutely dead broke, in which case you're an edge case which might have bigger problems to solve on the way of getting this list app on the road.

if you need Dedicated Hosting its a big price jump :)
i have a cheap windows hosting but i can not use ms management studio to design / edit my sql databases, only via a web tool.
i can backup and download my databases but its not possible for me to design at pc and restore exact this database at web hosting.
its because safety for the web hosting service. had some other time wasting experience but the price per month its worth.

I'm having some problems parsing this, but it seems you're having problems with your hosting. I realize that it sounds like I'm in love with Dreamhost but I'm not, it's just that I have had like... uh... 15 years or so experience from them. There are lots of other good hosting companies also. But my point here was that you can connect to your database at DH and work with it just fine. I do it every day, and I like to use DBeaver, which I can recommend a lot.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
Upvote 0

KMatle

Expert
Licensed User
Longtime User
Upvote 0

udg

Expert
Licensed User
Longtime User
Hi, have a look here. It may be of inspiration..

What I'd like to suggest is to consider a simple B4J program that works as the broker for the list. It accepts a command to receive and store locally (on the server) the list and another command to recover from file or memory the current list and send it to the requesting party.

It could even works as a semaphore to block concurrent list modifications.
 
Upvote 0
Top