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 8711967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:00:44+00:00 2026-06-13T05:00:44+00:00

I am using Netbeans7.2 and entered uses-permission also but i have this error Java.net.Socket

  • 0

I am using Netbeans7.2 and entered uses-permission also but i have this error Java.net.Socket Exception Internet denied(Maybe missing internet permission )`
my AndroidManifest file like this

  <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="importacao.dados"
          android:versionCode="1"
          android:versionName="1.0">
        <application android:label="@string/app_name" >
            <activity android:name="importacao"
                      android:label="@string/app_name">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.LAUNCHER" />
                    <uses-permission android:name="android.permission.INTERNET" /> 
                </intent-filter>
            </activity>
        </application>
    </manifest> 

//Button

cliente.setOnClickListener(new  Button.OnClickListener(){
    public void onClick(View view){
        InputStream is = null;
         ArrayList namevaluePairs = new ArrayList();
        List r = new ArrayList();
    try{
        HttpClient httpclient = new DefaultHttpClient();
        HttpPost httppost;
            httppost = new HttpPost("http://localhost/cliente.php");
        httppost.setEntity(new UrlEncodedFormEntity(namevaluePairs));
        HttpResponse response;
            response = httpclient.execute(httppost);
        HttpEntity entity = response.getEntity();
        is = entity.getContent();
    }
    catch(Exception e)
    {
        Toast.makeText(getBaseContext(),e.toString(),Toast.LENGTH_LONG).show();
    }
    try{
    BufferedReader reader = new BufferedReader(new InputStreamReader(is,"UTF-8"));
     StringBuilder sb = new StringBuilder();
     String line = null;
      while((line=reader.readLine()) != null)
     {
      //   
     }}
    catch(Exception e)
    {
       Log.e("Erro",e.toString());
    }}});
  • 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-13T05:00:45+00:00Added an answer on June 13, 2026 at 5:00 am

    Move your uses-permission tag to be outside the application tag. You also might need to add a uses-permission for android.permission.ACCESS_NETWORK_STATE, not sure how netbeans works.

    <?xml version="1.0" encoding="utf-8"?>
        <manifest xmlns:android="http://schemas.android.com/apk/res/android"
            package="importacao.dados"
            android:versionCode="1"
            android:versionName="1.0">
    
            <uses-permission android:name="android.permission.INTERNET" />
    
            <application android:label="@string/app_name" >
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Java, but I'm loving it! I'm using NetBeans7.2, and when I
I'm using NetBeans as my IDE. Whenever I have some code that uses another
(using netbeans and java) I have the following 1 text field named input 1
I'm using NetBeans IDE 6.9.1 for developing java/javafx applets, this netbeans version generates only
I am a novice to Java programming using Netbeans. I have added jCalendar to
I have recently started using Netbeans with following stack Liferay, icefaces with jBoss. Is
Using Netbeans 6.8 and metro 2.0 I have written a simple application that makes
I've been using netbeans for java gui creations, are there any other better frameworks
I am using Netbeans 6.7. I had first installed Java 1.5 before installing Netbeans.
I'm using NetBeans IDE 7.1 From this IDE I run first build and wait

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.