Blog Archives

android app cannot connect to internet

To allow your custom app to connect to the internet, add the following in your AndroidManifest.xml file right before (outside) the application tag.

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

Get Current URL in Javascript

JS (JQuery):

$(document).ready(function() {
    $(location).attr('href');
});

JS (standard):

function CurrentURL() {
    var currenturl = window.location.pathname;
return currenturl;
}