Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8391023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:09:02+00:00 2026-06-09T19:09:02+00:00

i got a very unusual problem as my application works fine on emulator in

  • 0

i got a very unusual problem as my application works fine on emulator in which i’m using java socket programming to connect android device with server pc….but when i install my .apk file in my android mobile it gets crash…it does not connect with my server PC ….
please suggest some solutions why this is happening…i’m posting my socket code here…

try {
        socket = new Socket(InetAddress.getByName("vivek-PC")
                .getHostAddress(), 8888);

        dataOutputStream = new DataOutputStream(socket.getOutputStream());
        dataInputStream = new DataInputStream(socket.getInputStream());
    } catch (UnknownHostException e) {
        // textIn.setText("Button Clicked" + e);
        e.printStackTrace();
    } catch (IOException e) {

        e.printStackTrace();

    }

i have tried both way to put hostname as well as my serverIP address bt same result i get/….works fine on emulator and get crashed on device…
please reply soon..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T19:09:03+00:00Added an answer on June 9, 2026 at 7:09 pm

    download android terminal emulator on your device and try to ping your Pc using your pc ip address. if it got success then replace your codeInetAddress.getByName("vivek-PC")
    .getHostAddress()
    with the ip address of server PC.
    Hope it will help you..
    if still u face any problem, then plz let me know about it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got very little javascript programming skill, so this must be the problem with
I got very strange problem. I have one php website which is running in
Suddenly, I got a very unusual problem. In NetBeans 7.0 the . stopped working
I have got very big problem because I would like to get more information
got a very simple question which I can't seem to find any answer for.
I've got a very simple question around Rails MVC/application design with a focus on
I've got very weird problem in my current project. The #head div looks like
I need your support because I have got very difficult problem. I would like
I got this very weird problem...and it's very important to my...dead line is close...and
I got a very strange error on my android apk that only appears if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.