Android Question WiFi Direct

luke2012

Well-Known Member
Licensed User
Longtime User
Hi @Erel,
I have a couple of questions about WiFi Direct library & tutorial (http://www.basic4ppc.com/android/forum/threads/wifidirect-library.30410/) :

1) I wish to implement a scenario where I have a server device and one or more client devices : is it possible to set a predefined "server" (group owner) where the "client" devices can connect ?

2) Within this scenario, I wish to implement a data collection (like "Data collection" solution) where "client" devices can read/write objects (like read only catalog entry and write order entry).

In this scenario wich is the best approach about data management :
a) use a centralized db stored on "server" device where "client" devices access over WiFi Direct in order to read/write objects
b) use a centralized db stored on "server" and a local "cache" db in the "client" devices in order to read/write objects and allow the client app to works also without a "server" connection (using cached data in local db) ?
 
Last edited:

luke2012

Well-Known Member
Licensed User
Longtime User
Must you use wifi direct?

It is less suited for connecting multiple devices.

I thinking about Wifi Direct because it's smarter (for users) than other solution like setup a PC server environment.
So Wifi Direct no way ? Which solution do you advice me about this?

Thanks
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
Most devices doesn't support wifi direct feature.

Bluetooth will probably work better if the range is close enough.

OK @Erel.
I have to check if the range is enough.
But assuming that is enough, the choice is between bluetooth and "B4J [Server] Data Collection Solution". Right ?

I known that using Data collection solution I have a framework that allow to send objects from clients to server.
I'm asking me if bluetooth have the same possibility. Probably implementing AsyncStream Object over bluetooth (http://www.basic4ppc.com/android/fo...d-and-receive-objects-instead-of-bytes.30543/) ?
 
Last edited:
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
If the devices are connected to the same router then you can use the standard Network library.

A B4J server is 10x more powerful than any solution created with Bluetooth or raw sockets.

I agree with you @Erel.
I'm wish to adopt B4J Server as platform to implement a order taking solution.

In this scenario is the "B4J [Server] - Data Collection Solution" the correct solution ?
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
It depends on your requirements.

This project should be a good start.

@Erel,
in a few words, I have 3 main roles :

1) Order submitter : access catalog items (read only) and create orders
2) Order receiver : read / update the orders submitted
3) Catalog & Order Administrator : read / update / create catalog items and read / update / create Orders

In this scenario, wich is the best approach using B4A app as client and B4J server ?

1) Implement a single app using "Conditional Compilation & Build Configurations" to handle each role
2) Implement a specific app for each role (in this case 3 different apps).

Thanks
 
Last edited:
Upvote 0
Top