B4AServer - simplifies development of enterprise in-house Android applications

MiniDemonic

Member
Licensed User
Longtime User
Moving the mouse in windows is not hard, I developed my own Remote Desktop in vb6 like 4 years ago, but I do not know how to send packets from my phone app to my computer server, is there any library that can do this ? Kinda like this B4Aserver but only sending text commands instead of files.

A library like that could be used for many things, for example one could make an application that controls the computer mouse/keyboard (think Gmote).

EDIT:
Oh, I read your post too fast (tired, it's too early) and missed the part about shell commands.
I will look into using B4AServer.Shell, it might be what I'm looking for. :)
 
Last edited:

karld

Active Member
Licensed User
Longtime User
Is there a way to stop the server after a file transfer takes place?

I want to call it from another program on the PC and then have it shutdown after the file transfer takes place.

Karl
 

karld

Active Member
Licensed User
Longtime User
I might be using improper terminology. My apologies.

On the PC the file b4aserver.jar file.

The demo has a batch file that starts it up and it opens in a command shell window.

I am looking to run the b4aserver.jar file and then close it when I am done with it.

I am writing a PC application that will only run the jar when files need to be transfered from the android device.

Hope I was clearer

Karl
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The only way to kill it from a different process is by finding the correct process and then killing the process. If there are several Java applications running then it is a bit more complicated as all of the processes will be named Java. In that case you will need to find the correct process using a program named jps.exe from the Java SDK.
 

afagcaoili

Member
Licensed User
Longtime User
Feature request on B4A Server

This solution would be really great in doing some remote connections like SSH, Telnet, etc. from an Android device to a server/device through the B4ASERVER. Obviously, the B4ASERVER will have the access to the server/device.

This would be possible right? The shell script solution would do the trick but I am not sure how to get this accomplished yet.

I am sure you are busy but whenever you have time Erel, would you make a sample demo on how to accomplish this?

Thanks a lot.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The flow should be: Device calls Server -> Server runs a windows application that accesses the remote data -> This application returns data to the device.

The device cannot access the remote resource directly. It instead needs to pass all the data required to the windows application which is responsible for accessing the remote resource.
 

Tex8503

Active Member
Licensed User
Longtime User
Erel,
the B4AServer sounds interesting - but I'm thinking my users aren't going to want to have to support a separate web server for the board server - they might actually be more ok with an open port to have the device send data directly to the server... Is this an option?
 

karld

Active Member
Licensed User
Longtime User
I have been playing around and I have figured out a way to start and stop the b4aserver.jar file on the PC using batch files. I googled and found a small utility called getpids.exe
Using a couple of batch files I can start the b4aserver.jar and it writes out a small text file that records the PID of the command shell that the b4aserver.jar is running in. Another batch file reads in that text file with the PID info in it and issues a taskkill for that PID.

I have attached a zip file with the getpids.exe file and the two batch files. Just unzip it into the directory that b4aserver.jar file is run from.

I am running this on a windows 7 computer.

You will need to already have setup b4aserver and have it working.

Thanks Erel for all the cool stuff you put out!!

Karl
 

tokyoburns

New Member
Licensed User
Longtime User
number of devices connected?

i see where you can set the number of devices that can be connected but what are the limitations for this connection? like how can i determine the maximum number of devices can be connected at once? also is there a conflict when more than one device tries to connect like does the service become slower and how do i deal with that?
 

madSac

Active Member
Licensed User
Longtime User
Are you using sockets to communicate between both devices or any other method ?
 

navasrahman

Member
Licensed User
Longtime User
Erel,
When I try to run batch file in my desktop I am getting an error

Error: Could not find or load main class anywheresoftware.b4a.b4aserver.Server

Can plz give idea to resolve it.
 

navasrahman

Member
Licensed User
Longtime User
Thank u for ur reply......
I found the reason for the error. To the reference for the others I post the reason

Error Message as follows


C:\Windows\system32>java -cp b4aserver.jar anywheresoftware.b4a.b4aserver.Server

Error: Could not find or load main class anywheresoftware.b4a.b4aserver.Server

C:\Windows\system32>pause
Press any key to continue . . .


Solution for this..........

Copy And Paste "b4aserver.jar" file and "config" file in to the particular folder

Now my command window like this


C:\Windows\system32>java -cp b4aserver.jar anywheresoftware.b4a.b4aserver.Server

B4A server (v0.92) is started. Checking URL: http://b4aserver.basic4ppc.com/b4a
_server.php, server name=test1


I think it is working.........right???

erel plz confirm
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. You should create the database and add a user name. The PHP script will create the table. The database files are not really important. The position depends on your server setup.

2. I usually use PhpMyAdmin. Again it depends on your server.

There should be many online tutorials about PHP / MySQL that show how to build a database.

I am surprised that there is so little in this forum about B4Aserver. It opens up so many possibilities!
I agree. It is indeed a nice tool.
 
Top