עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

עזרה | web content android studio

Featured Replies

פורסם

אהלן חברה,
אני מנסה להתחבר לאינטרנט דרך האנדרואיד סטודיו, כדי להוריד דברים ישירות ויש לי תקלה שאני לא מצליח לתקן.


D/NetworkSecurityConfig: No Network Security Config specified, using platform default

package com.example.download;


import androidx.appcompat.app.AppCompatActivity;


import android.os.AsyncTask;
import android.os.Bundle;
import android.os.StrictMode;
import android.util.Log;


import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;


import javax.net.ssl.HttpsURLConnection;


public class MainActivity extends AppCompatActivity {


public class DownloadTask extends AsyncTask<String, Void, String> {


@Override
protected String doInBackground(String... urls) {


String result = "";
URL url;

HttpURLConnection urlConnection = null;




try {
url = new URL(urls[0]);
urlConnection = (HttpURLConnection) *****openConnection();
InputStream in = urlConnection.getInputStream();
InputStreamReader reader = new InputStreamReader(in);
int data = reader.read();


while (data != -1) {
char current = (char) data;


result += current;




data = reader.read();
}


return result;


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


return "Failed";
}
}
}


@Override
protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);



DownloadTask task = new DownloadTask();
String result = null;
try {
result = task.execute("http://www.zappycode.com").get();
} catch (Exception e) {
e.printStackTrace();
}


Log.i("Result",result);
}
}


תודה רבה לעוזרים !

  • 1 חודש מאוחר יותר...
פורסם

בבקשה קוד משמאל לימין.

פורסם

אתה שם לב שאתה עונה למלא דיונים ישנים שכבר מזמן לא רלוונטיים?

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.