B4J Tutorial B4J CCTV example


This example is similar to the previous example: http://www.basic4ppc.com/android/fo...closed-circuit-tv-cctv-example.23601/#content

The server is now implemented in B4J.

In order to run this example you will need to allow incoming connections on port 17178 (or other port). See the above link for more information.

The communication is based on AsyncStreams in prefix mode.

The complete server code is less than 50 lines of code.

You should set the server ip address in the device code (ServerIp in Sub Process_Globals).


  • CCTV-B4A.zip
    9.8 KB · Views: 2,112
  • CCTV-B4J.zip
    1.4 KB · Views: 2,196


Staff member
Licensed User

The example attached allows you to connect multiple devices to the desktop. The layout is set for two devices. It should be simple to add more ImageViews and connect more devices.

The server can cope with disconnections and reconnections.


  • CCTV-B4J.zip
    1.7 KB · Views: 1,699
Last edited:


Licensed User
cool erel? i will try with my IP CAM.
erel do yo have sample code for make line chart with b4j??


Active Member
Licensed User
Note that this example requires B4J Beta 3+ (which will soon be released).

He he

After some test without sucsess i return here and then i noticed Beta 3 ...
So ok lets try some more

By the way Erel

This is locking really good !!
Last edited:


Well-Known Member
Licensed User
Thanks, Erel! this is a very nice application.

But what is the code in B4A for

Dim img As Image

to transform it to B4A??? :confused:

Thanks for help...


Well-Known Member
Licensed User
Hi everybody, I have ported, some month ago, the idea to 3G communication, using an home made DNS to resolve IP addresses of both Android's and PC's devices. There is the need for a WEB supervisor with a fixed IP, but having a good speed in connections you can have bidirectional audio, video and instant position of the device on both wifi and public network connections. The system is built on OpenGts, but there is no need to have the full package online. It can handle unlimited operators' stations and unlimited controlled devices. It's only one example of what the marvelous package Anywhere Software can build. Thank you Erel!


Licensed User
why my IP Address always I already changed to but still same for the result? what happen?

Similar Threads