עבור לתוכן
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.

קריאת xml - אנדרואיד

Featured Replies

פורסם

הי

משום מה אני לא מצליח לקרוא xml משום אתר, הוא תמיד נותן לי שגיאת permission denied.

להלן הקוד


private RSSFeed getFeed(String urlToRssFeed)
{
URL url=null;
try
{
// setup the url
url = new URL(urlToRssFeed);

// create the factory
SAXParserFactory factory = SAXParserFactory.newInstance();

// create a parser
SAXParser parser = factory.newSAXParser();

// create the reader (scanner)
XMLReader xmlreader = parser.getXMLReader();

// instantiate our handler
RSSHandler theRssHandler = new RSSHandler();

// assign our handler
xmlreader.setContentHandler(theRssHandler);

// get our data through the url class
xmlreader.parse(new InputSource(url.openStream()));

// get the results - should be a fully populated RSSFeed instance,
// or null on error
return theRssHandler.getFeed();
}
catch (Exception ee)
{
// if you have a problem, simply return null
new AlertDialog.Builder(this)
.setMessage(ee.getMessage()).show();

return null;
}
}

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

אתה צריך להוסיף בAndroidManifest.xml‬

את השורה הזאת:


<uses-permission android:name="android.permission.INTERNET"></uses-permission>

ארכיון

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

דיונים חדשים

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.