Click here to Skip to main content
15,849,543 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I'm trying to set a connection between 2 devices. As a matter of fact, I'm writing a game application, and I want to run it in 2 devices. One of these devices is a virtual device, and the other one is my phone number, a physical device. I need to run the application in both devices, and after finding each other, and connecting to each other, both will be redirected to the final activity in which the game algorithm will be implemented, between these 2. The following are my classes. Can anyone tell me where I'm wrong? I don't think the connection is even established.

Java
<pre>package com.example.soccergamedevelopmentproject;

import android.content.Context;
import android.content.Intent;
import android.util.Log;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.PortUnreachableException;
import java.net.ServerSocket;
import java.net.Socket;
import java.security.PublicKey;
import java.util.concurrent.CountDownLatch;

public class AcceptThread extends Thread{
    private ServerSocket ServerDeviceSocket;
    protected Socket ClientDeviceSocket;
    protected CountDownLatch latch;
    private int port ;
    private boolean isAcceptThreadConnected = false;
    public AcceptThread(CountDownLatch latch, int port){

        this.latch = latch;
        this.port = port;

    }

    @Override
    public void run() {

        InitializeServerSocket();
        AcceptConnection();
        CountDownLatchNotificationForClient();
        AwaitForClient();

    } // RUN

    public void InitializeServerSocket(){

        try {
            ServerDeviceSocket = new ServerSocket(port);        // Port is the characteristic of the Client.
            isAcceptThreadConnected = true;

        } catch (IOException e) {
            e.printStackTrace();
        }

        // CONNECT

    } // InitializeSocket

    public void AcceptConnection() {

        this.setName("Accept Thread Class");

        while (true) {
            try {

                assert ServerDeviceSocket != null;
                Socket socket = ServerDeviceSocket.accept();
                InputStream inputStream = socket.getInputStream();
                OutputStream outputStream = socket.getOutputStream();
                // Read data from the client socket.
                byte[] buffer = new byte[1024];
                int bytesRead = inputStream.read(buffer);
                // Write data to the client socket.
                outputStream.write("Hello, world!".getBytes());

                if (socket != null && !socket.isClosed()) {
                    socket.close();
                    Log.i(FindingMatchActivity.class.getSimpleName(), "Both Sockets are closed");

                }
            } catch (IOException e) {
                throw new RuntimeException(e);
            }

        } // AcceptConnection
    }
    public void CloseConnectionOnBothSides(){

        try {
            ClientDeviceSocket.close();
            ServerDeviceSocket.close();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    } // Close SocketConnection

    public void CountDownLatchNotificationForClient(){

        this.latch.countDown();

    } // LatchCountDown

    public void AwaitForClient(){

        try {
            this.latch.await();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }

    } // wait for the client

    public boolean GetIsAcceptThreadConnected(){

        return this.isAcceptThreadConnected;
    }

} // AcceptThread

My Connect thread is also as follows:
Java
<pre>package com.example.soccergamedevelopmentproject;

import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.os.Message;
import android.widget.Toast;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.util.concurrent.CountDownLatch;

public class ConnectThread extends Thread{

    public final int MaxConnectionRetries = 2;
    protected  int ConnectionRetries = 0;  // Initial
    protected Socket DeviceSocket;
    private String ipAddress;           // For Socket Device
    protected int port;                       // For Socket Device
    public CountDownLatch clientLatch;
    protected Handler handler;
    protected boolean isConnectThreadConnected = false;
    public ConnectThread(String ipAddress,
                         int port,
                         CountDownLatch clientLatch,
                         Handler handler){

        this.ipAddress = ipAddress;
        this.port = port;
        this.clientLatch = clientLatch;
        this.handler = handler;

    }

    @Override
    public void run() {

        setName(" Connect Thread Class");
        InitializeDeviceSocket();
        ConnectToTheServer();

    } // RUN

    public void InitializeDeviceSocket(){

        try {
            DeviceSocket = new Socket(this.ipAddress, this.port);
            isConnectThreadConnected = true;

            // Get the input and output streams from the socket.
            InputStream inputStream = DeviceSocket.getInputStream();
            OutputStream outputStream = DeviceSocket.getOutputStream();
            // Read data from the socket.
            byte[] buffer = new byte[1024];
            int bytesRead = inputStream.read(buffer);
            // Write data to the socket.
            outputStream.write("Hello, world!".getBytes());

            if(DeviceSocket != null){
                CloseSocketConnection();
            }

        } catch (IOException e) {
            throw new RuntimeException(e);

        }

    } // Initialize DeviceSocket

    public void WaitForTheServer() {

        try {
            clientLatch.await();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }

    public void HandleConnectionFailure(){

        if(ConnectionRetries <= MaxConnectionRetries) {

            ConnectionRetries += 1;
            retryConnection();

        } else{

        Message handlerMessage = handler.obtainMessage();
        handlerMessage.obj = "Connection Failed. Please Try again...";
        handler.sendMessage(handlerMessage);
        }

    } // HandleConnection Failure

    public void CloseSocketConnection(){

        try {
            DeviceSocket.close();
        } catch (IOException e) {
            e.printStackTrace();
            HandleConnectionFailure();

        }
    } // Close Socket Connection

  public void ConnectToTheServer(){

      InetSocketAddress inetSocketAddress = new InetSocketAddress(this.ipAddress, this.port);
      try {

          clientLatch.countDown();
          WaitForTheServer();
          DeviceSocket.connect(inetSocketAddress);

      } catch (IOException e) {
          e.printStackTrace();

      } finally {

          CloseSocketConnection();
      }

      // CONNECT

  } //ConnectTOtHEsERVER

    public void retryConnection(){

        try {
            Thread.sleep(2000);
            ConnectToTheServer();

        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    } // Retry Connection

    public void setIpAddress(String ipAddress){

        this.ipAddress = ipAddress;
    }

    public boolean GetIsConnectThreadConnected(){

        return this.isConnectThreadConnected;
    }
} // ConnectThread

And finally, the FindingMatchActivity is as follows:
Java
<pre>    package com.example.soccergamedevelopmentproject;

    import androidx.annotation.NonNull;
    import androidx.appcompat.app.AppCompatActivity;

    import android.content.Context;
    import android.content.Intent;
    import android.net.nsd.NsdServiceInfo;
    import android.net.wifi.WifiInfo;
    import android.net.wifi.WifiManager;
    import android.os.Bundle;
    import android.os.Handler;
    import android.os.Looper;
    import android.os.Message;
    import android.text.format.Formatter;
    import android.util.Log;
    import android.widget.Toast;

    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.lang.ref.WeakReference;
    import java.net.ServerSocket;
    import java.net.Socket;
    import java.util.concurrent.CountDownLatch;

    public class FindingMatchActivity extends AppCompatActivity {

        private static final String TAG = "FindingMatch Activity";
        public CountDownLatch latch;
        private AcceptThread acceptThread;
        private ConnectThread connectThread;
        public final int port = 51772;
        private String ipAddress;
        public int IntegerIp;
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_finding_match);

            WifiManager wifiManager = (WifiManager) getApplicationContext().getSystemService(WIFI_SERVICE);
            WifiInfo wifiInfo = wifiManager.getConnectionInfo();
            IntegerIp = wifiInfo.getIpAddress();
             ipAddress = Formatter.formatIpAddress(IntegerIp);

            latch = new CountDownLatch(2);
            acceptThread = new AcceptThread( latch, port);
            StartThreads();

        } // On Create

        @Override
        protected void onDestroy() {
            super.onDestroy();
            Log.e(TAG, "Connection lost");
        }

        public void StartThreads(){

            connectThread = new ConnectThread(ipAddress, port,  latch, new MyHandler(FindingMatchActivity.this));
            connectThread.setIpAddress(ipAddress);

            if(connectThread != null) {

                acceptThread.start();
                connectThread.start();

                Log.i(TAG, "\n"+
                        "Accept Thread Connection: "+
                        acceptThread.GetIsAcceptThreadConnected() +
                        "\n" +
                        "Connect Thread Connection: " +
                        connectThread.GetIsConnectThreadConnected());

                if (acceptThread.GetIsAcceptThreadConnected() && connectThread.GetIsConnectThreadConnected()) {
                    NavigateToTheFinalActivity(this);
                }
            }
        } // Start Threads

        private static class MyHandler extends Handler{

            protected WeakReference<FindingMatchActivity> activityRef;
            public MyHandler(FindingMatchActivity activity){

                activityRef = new WeakReference<>(activity);

            }
            @Override
            public void handleMessage(@NonNull Message msg) {

                FindingMatchActivity activity = activityRef.get();
                if (activity != null) {
                    String messageFromConnectedThread = (String) msg.obj;
                    Toast.makeText(activity, messageFromConnectedThread, Toast.LENGTH_LONG).show();
                }
            }

        } // MyHandler Class

        public void NavigateToTheFinalActivity(Context context){

            Intent GoTheFinalActivity = new Intent(context, FinalActivity.class);
            context.startActivity(GoTheFinalActivity);

        } // NavigateTotHEfINALaCtivity

    } // Finding Match Activity


What I have tried:

Just the classes I have posted.
Posted
Updated 16-Jul-23 9:24am
v2
Comments
Andre Oosthuizen 16-Jul-23 14:26pm    
Debuging, debugging, debugging. This is a lot of code for us to work through and try and determine where you error 'ed. Rather start debugging, find the lines where it errors and then post that for a solution.

1 solution

Java
<pre>
07/17 13:07:29: Launching 'app' on Pixel 6 Pro API 33.
Install successfully finished in 1 s 677 ms.
$ adb shell am start -n "com.example.soccergamedevelopmentproject/com.example.soccergamedevelopmentproject.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 5885 on device 'Pixel_6_Pro_API_33 [emulator-5554]'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/elopmentproject: Late-enabling -Xcheck:jni
W/elopmentproject: Unexpected CPU variant for x86: x86_64.
    Known variants: atom, sandybridge, silvermont, kabylake, default
W/re-initialized>: type=1400 audit(0.0:24): avc: granted { execute } for path="/data/data/com.example.soccergamedevelopmentproject/code_cache/startup_agents/8dee6a62-agent.so" dev="dm-33" ino=156913 scontext=u:r:untrusted_app_30:s0:c236,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c236,c256,c512,c768 tclass=file app=com.example.soccergamedevelopmentproject
V/studio.deploy: Startup agent attached to VM
V/studio.deploy: No existing instrumentation found. Loading instrumentation from instruments-b5380c1f.jar
W/elopmentproject: DexFile /data/data/com.example.soccergamedevelopmentproject/code_cache/.studio/instruments-b5380c1f.jar is in boot class path but is not in a known location
V/studio.deploy: Applying transforms with cached classes
W/elopmentproject: Suspending all threads took: 11.356ms
W/elopmentproject: Redefining intrinsic method java.lang.Thread java.lang.Thread.currentThread(). This may cause the unexpected use of the original definition of java.lang.Thread java.lang.Thread.currentThread()in methods that have already been compiled.
W/elopmentproject: Redefining intrinsic method boolean java.lang.Thread.interrupted(). This may cause the unexpected use of the original definition of boolean java.lang.Thread.interrupted()in methods that have already been compiled.
D/CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10236; state: ENABLED
W/ziparchive: Unable to open '/data/data/com.example.soccergamedevelopmentproject/code_cache/.overlay/base.apk/classes3.dm': No such file or directory
W/ziparchive: Unable to open '/data/app/~~ecyVO0fbmPgiyw1Ul9NCIA==/com.example.soccergamedevelopmentproject-14rMVtFTo8X9J4wf2j3_4w==/base.dm': No such file or directory
W/ziparchive: Unable to open '/data/app/~~ecyVO0fbmPgiyw1Ul9NCIA==/com.example.soccergamedevelopmentproject-14rMVtFTo8X9J4wf2j3_4w==/base.dm': No such file or directory
D/nativeloader: Configuring classloader-namespace for other apk /data/app/~~ecyVO0fbmPgiyw1Ul9NCIA==/com.example.soccergamedevelopmentproject-14rMVtFTo8X9J4wf2j3_4w==/base.apk. target_sdk_version=31, uses_libraries=, library_path=/data/app/~~ecyVO0fbmPgiyw1Ul9NCIA==/com.example.soccergamedevelopmentproject-14rMVtFTo8X9J4wf2j3_4w==/lib/x86_64, permitted_path=/data:/mnt/expand:/data/user/0/com.example.soccergamedevelopmentproject
V/GraphicsEnvironment: ANGLE Developer option for 'com.example.soccergamedevelopmentproject' set to: 'default'
V/GraphicsEnvironment: ANGLE GameManagerService for com.example.soccergamedevelopmentproject: false
V/GraphicsEnvironment: Neither updatable production driver nor prerelease driver is supported.
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
D/libEGL: loaded /vendor/lib64/egl/libEGL_emulation.so
D/libEGL: loaded /vendor/lib64/egl/libGLESv1_CM_emulation.so
D/libEGL: loaded /vendor/lib64/egl/libGLESv2_emulation.so
D/AppCompatDelegate: Checking for metadata for AppLocalesMetadataHolderService : Service not found
W/elopmentproject: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
W/elopmentproject: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
D/CompatibilityChangeReporter: Compat change id reported: 210923482; UID 10236; state: DISABLED
D/CompatibilityChangeReporter: Compat change id reported: 37756858; UID 10236; state: ENABLED
D/HostConnection: createUnique: call
D/HostConnection: HostConnection::get() New Host Connection established 0x70b74785f2d0, tid 5912
D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma ANDROID_EMU_hwc_multi_configs GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_2 
W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
W/OpenGLRenderer: Failed to initialize 101010-2 format, error = EGL_SUCCESS
D/EGL_emulation: eglCreateContext: 0x70b74785dd10: maj 2 min 0 rcv 2
D/EGL_emulation: eglMakeCurrent: 0x70b74785dd10: ver 2 0 (tinfo 0x70b962dfe080) (first time)
I/Gralloc4: mapper 4.x is not supported
D/HostConnection: createUnique: call
D/HostConnection: HostConnection::get() New Host Connection established 0x70b74785e190, tid 5912
D/goldfish-address-space: allocate: Ask for block of size 0x100
D/goldfish-address-space: allocate: ioctl allocate returned offset 0x3f3ffe000 size 0x2000
W/Gralloc4: allocator 4.x is not supported
D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma ANDROID_EMU_hwc_multi_configs GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_2 
W/Parcel: Expecting binder but got null!
I/OpenGLRenderer: Davey! duration=743ms; Flags=1, FrameTimelineVsyncId=27831, IntendedVsync=548625608350, Vsync=548625608350, InputEventId=0, HandleInputStart=548637015600, AnimationStart=548637060700, PerformTraversalsStart=548637123800, DrawStart=549267228500, FrameDeadline=548642275016, FrameInterval=548636950300, FrameStartTime=16666666, SyncQueued=549277714200, SyncStart=549286102900, IssueDrawCommandsStart=549287800500, SwapBuffers=549366326900, FrameCompleted=549377227500, DequeueBufferDuration=50300, QueueBufferDuration=364800, GpuCompleted=549377227500, SwapBuffersCompleted=549370956600, DisplayPresentTime=0, CommandSubmissionCompleted=549366326900, 
D/EGL_emulation: app_time_stats: avg=483.93ms min=265.52ms max=893.21ms count=3
I/OpenGLRenderer: Davey! duration=1084ms; Flags=2, FrameTimelineVsyncId=28031, IntendedVsync=549725608306, Vsync=549725608306, InputEventId=0, HandleInputStart=549725608306, AnimationStart=549725608306, PerformTraversalsStart=549725608306, DrawStart=549725608306, FrameDeadline=549742274972, FrameInterval=0, FrameStartTime=16666666, SyncQueued=549729982600, SyncStart=549729999600, IssueDrawCommandsStart=549730045300, SwapBuffers=550530218000, FrameCompleted=550809943000, DequeueBufferDuration=47400, QueueBufferDuration=618300, GpuCompleted=550809943000, SwapBuffersCompleted=550559124000, DisplayPresentTime=0, CommandSubmissionCompleted=550530218000, 
D/EGL_emulation: app_time_stats: avg=65.18ms min=13.55ms max=131.77ms count=7
W/elopmentproject: Verification of int androidx.emoji2.text.flatbuffer.MetadataItem.id() took 111.709ms (170.08 bytecodes/s) (1840B approximate peak alloc)
D/EGL_emulation: app_time_stats: avg=221.73ms min=188.72ms max=237.18ms count=4
D/EGL_emulation: app_time_stats: avg=80.44ms min=6.46ms max=149.25ms count=9
D/EGL_emulation: app_time_stats: avg=34.59ms min=3.71ms max=91.72ms count=20
D/EGL_emulation: app_time_stats: avg=34.89ms min=4.77ms max=91.90ms count=14
D/EGL_emulation: app_time_stats: avg=45.04ms min=5.43ms max=129.34ms count=15
D/EGL_emulation: app_time_stats: avg=11.16ms min=2.43ms max=62.32ms count=39
D/EGL_emulation: app_time_stats: avg=22.99ms min=2.67ms max=100.08ms count=32
D/EGL_emulation: app_time_stats: avg=10.22ms min=2.91ms max=44.30ms count=46
D/EGL_emulation: app_time_stats: avg=11.62ms min=2.60ms max=39.87ms count=43
W/Parcel: Expecting binder but got null!
W/System: A resource failed to call close. 
W/Parcel: Expecting binder but got null!
D/AutofillManager: Fill dialog is enabled:false, hints=[password, passwordAuto, creditCardNumber, creditCardSecurityCode, creditCardExpirationDate]
I/FindingMatch Activity: Accept Thread Connection: false
    Connect Thread Connection: false
D/TrafficStats: tagSocket(104) with statsTag=0xffffffff, statsUid=-1
D/TrafficStats: tagSocket(105) with statsTag=0xffffffff, statsUid=-1
D/TrafficStats: tagSocket(107) with statsTag=0xffffffff, statsUid=-1
I/TAG: Socket Found
W/Parcel: Expecting binder but got null!
I/elopmentproject: Background young concurrent copying GC freed 229376(3615KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3748KB/7432KB, paused 1.699ms,1.079ms total 318.962ms
I/elopmentproject: Background young concurrent copying GC freed 229376(3615KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3748KB/7432KB, paused 3.479ms,234us total 316.080ms
I/elopmentproject: Background young concurrent copying GC freed 229556(3615KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3748KB/7432KB, paused 1.159ms,447us total 574.599ms
I/elopmentproject: Background concurrent copying GC freed 230273(3616KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3716KB/7432KB, paused 4.903ms,1.612ms total 254.450ms
I/elopmentproject: Background young concurrent copying GC freed 229584(3615KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3716KB/7432KB, paused 14.998ms,102us total 47.432ms
I/elopmentproject: Background concurrent copying GC freed 230676(3632KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3716KB/7432KB, paused 1.423ms,3.937ms total 168.565ms
I/elopmentproject: Background young concurrent copying GC freed 229546(3615KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3716KB/7432KB, paused 2.400ms,4.223ms total 121.469ms
I/elopmentproject: Background concurrent copying GC freed 230517(3632KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3716KB/7432KB, paused 29.737ms,95us total 145.005ms
I/elopmentproject: Background young concurrent copying GC freed 229432(3615KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3732KB/7432KB, paused 5.449ms,3.921ms total 498.362ms
I/elopmentproject: Background young concurrent copying GC freed 229419(3615KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3716KB/7432KB, paused 22.298ms,113us total 164.835ms
I/elopmentproject: Background young concurrent copying GC freed 229376(3615KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3732KB/7432KB, paused 680us,244us total 152.855ms
I/elopmentproject: Background young concurrent copying GC freed 229376(3615KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3732KB/7432KB, paused 549us,253us total 128.061ms
I/elopmentproject: Background young concurrent copying GC freed 229453(3615KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3732KB/7432KB, paused 2.538ms,692us total 308.802ms
I/elopmentproject: Background young concurrent copying GC freed 229790(3615KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3716KB/7432KB, paused 53.826ms,273us total 187.588ms
I/elopmentproject: Background young concurrent copying GC freed 229400(3615KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3718KB/7432KB, paused 2.406ms,77us total 153.181ms
I/elopmentproject: Background concurrent copying GC freed 231957(3650KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 3748KB/7496KB, paused 1.147ms,312us total 1.092s
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900