B4J Tutorial B4J CCTV example

Erel

Administrator
Staff member
Licensed User


This example is similar to the previous example: http://www.basic4ppc.com/android/forum/threads/android-based-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).
 

Attachments

Erel

Administrator
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.
 

Attachments

Last edited:

supriono

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

Erel

Administrator
Staff member
Licensed User
This code will only work with devices that run the B4A program attached to the first post.

erel do yo have sample code for make line chart with b4j??
Please start a new thread for this question.
 

Erel

Administrator
Staff member
Licensed User
Download the code from the first post. It should be very simple to port it to Basic4android.
 

Nizze

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:

Erel

Administrator
Staff member
Licensed User
It should be set in the Android app code (Sub Process_Globals).
 

schimanski

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

But what is the code in B4A for

B4X:
Dim img As Image
    img.Initialize2(In)
    ImageView1.SetImage(img)
to transform it to B4A??? :confused:

Thanks for help...
 

Erel

Administrator
Staff member
Licensed User
B4X:
Dim img As Bitmap
img.Initialize2(In)
ImageView1.Bitmap = img
 

tigrot

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!
 

suciwulans

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

Erel

Administrator
Staff member
Licensed User
This is the IP address reported from the driver. Check IPConfig in the command line.
 

Erel

Administrator
Staff member
Licensed User
The minimum version was v1.00 (beta 3). It will work with the latest version of B4J.
 
Top