Git Product home page Git Product logo

bru_chat's Introduction

Bru_Chat

An Android chat application for text messaging without using Internet. Runs on devices connected with hotspot.

bru_chat's People

Contributors

kmlkant9 avatar gtmdotme avatar gulshanraj avatar

Watchers

James Cloos avatar  avatar Akshat Bhardwaj avatar  avatar Aashutosh avatar  avatar

bru_chat's Issues

App does not work properly on Mi devices

following problems occurred during testing of app on Mi device(Redmi Note 3)

  1. Host server ip fetch gives incorrect ip.
  2. connection with server from client Activity destroys server.

upon clicking the disconnect button after hosting server. the app abruptly closes

Here is the stack trace:

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.kmlkant3497.bru_chat, PID: 27150
java.lang.RuntimeException: Unable to stop activity {com.example.kmlkant3497.bru_chat/com.example.kmlkant3497.bru_chat.HostTabActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.net.ServerSocket.close()' on a null object reference
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3780)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3834)
at android.app.ActivityThread.access$1500(ActivityThread.java:164)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1431)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:5408)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:964)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.net.ServerSocket.close()' on a null object reference
at com.example.kmlkant3497.bru_chat.HostTabActivity.onStop(HostTabActivity.java:138)
at android.app.Instrumentation.callActivityOnStop(Instrumentation.java:1277)
at android.app.Activity.performStop(Activity.java:6237)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3775)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3834) 
at android.app.ActivityThread.access$1500(ActivityThread.java:164) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1431) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:150) 
at android.app.ActivityThread.main(ActivityThread.java:5408) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:964) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759) 

Edit:
the error occurs around this line of code, (in the serverSocket.close())

@Override
    protected void onStop() {
        super.onStop();
        try {
            // MAKE SURE YOU CLOSE THE SOCKET UPON EXITING
            serverSocket.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.