B4J Tutorial B4J CCTV example

Discussion in 'B4J Tutorials' started by Erel, Nov 20, 2013.

  1. Erel

    Erel Administrator Staff Member Licensed User


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

    Attached Files:

  2. Erel

    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.

    Attached Files:

    Last edited: Jul 26, 2014
    Peter Simpson, lemonisdead and MLDev like this.
  3. supriono

    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??
  4. Erel

    Erel Administrator Staff Member Licensed User

    This code will only work with devices that run the B4A program attached to the first post.

    Please start a new thread for this question.
  5. YIM bunchhat

    YIM bunchhat Active Member Licensed User

    I really interest this program, but I strongly want to use Phone to Phone. Not Phone to PC....:(
  6. Erel

    Erel Administrator Staff Member Licensed User

    Download the code from the first post. It should be very simple to port it to Basic4android.
    YIM bunchhat likes this.
  7. Nizze

    Nizze Active Member Licensed User

    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: Nov 22, 2013
  8. mau

    mau New Member Licensed User

    hi Erel where set my ip
  9. Erel

    Erel Administrator Staff Member Licensed User

    It should be set in the Android app code (Sub Process_Globals).
  10. schimanski

    schimanski 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...
  11. Erel

    Erel Administrator Staff Member Licensed User

    Dim img As Bitmap
    ImageView1.Bitmap = img
  12. tigrot

    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!
  13. suciwulans

    suciwulans Member Licensed User

    why my IP Address always I already changed to but still same for the result? what happen?
  14. Erel

    Erel Administrator Staff Member Licensed User

    This is the IP address reported from the driver. Check IPConfig in the command line.
  15. jean-louis

    jean-louis New Member

    can I stream the pictures from the front and backcamera simultaneously ? (needed for a project)

  16. Erel

    Erel Administrator Staff Member Licensed User

    Android doesn't allow you to open both cameras.
  17. cbal03

    cbal03 Member Licensed User

  18. Erel

    Erel Administrator Staff Member Licensed User

    Have you tried it? Does it really open both cameras?
  19. avacondios

    avacondios Active Member Licensed User

    Hi Erel,

    Can you provide the link for the B4J Beta 3+ ? I cannot find it.
  20. Erel

    Erel Administrator Staff Member Licensed User

    The minimum version was v1.00 (beta 3). It will work with the latest version of B4J.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice