All Questions

432
votes
12answers
99195 views

Is it valid to replace http:// with // in a <script src="http://...">?

I have the following element: <script type="text/javascript" src="https://cdn.example.com/js_file.js"></script> In this case the site is HTTPS, but the site may also be just HTTP. (The ...
315
votes
18answers
260307 views

Get filename and path from URI from mediastore

I have an onActivityResult returning from an mediastore image selection which I can get a URI for an image using the following: Uri selectedImage = data.getData(); Converting this to a string gives...
1042
votes
7answers
1307075 views

How are parameters sent in an HTTP POST request?

In an HTTP GET request, parameters are sent as a query string: http://example.com/page?parameter=value&also=another In an HTTP POST request, the parameters are not sent along with the URI. Where ar...
169
votes
9answers
184820 views

Get real path from URI, Android KitKat new storage access framework

Before the new gallery access in Android 4.4 (KitKat) I got my real path on the SD card with this method: public String getPath(Uri uri) { String[] projection = { MediaStore.Images.Media.DATA }; ...
3458
votes
32answers
834588 views

What is the difference between a URI, a URL and a URN?

People talk about URLs, URIs and URNs as if they're different things, but they look the same to the naked eye. What are the distinguishable differences between them?
127
votes
4answers
132747 views

How to implement my very own URI scheme on Android

Say I want to define that an URI such as: myapp://path/to/what/i/want?d=This%20is%20a%20test must be handled by my own application, or service. Notice that the scheme is "myapp" and not "http", or ...
154
votes
9answers
185439 views

Parse a URI String into Name-Value Collection

I've got the URI like this: https://google.com.ua/oauth/authorize?client_id=SS&response_type=code&scope=N_FULL&access_type=offline&redirect_uri=http://localhost/Callback I need a col...
129
votes
8answers
208901 views

How to get Bitmap from an Uri?

How to get a Bitmap object from an Uri (if I succeed to store it in /data/data/MYFOLDER/myimage.png or file///data/data/MYFOLDER/myimage.png) to use it in my application? Does anyone have an idea on...
84
votes
10answers
155002 views

How to get URI from an asset File?

I have been trying to get the URI path for an asset file. uri = Uri.fromFile(new File("//assets/mydemo.txt")); When I check if the file exists I see that file doesn't exist File f = new File(file...
56
votes
13answers
121417 views

How to use "Share image using" sharing Intent to share images in android?

I have image galley app in that app I placed all the images into the drawable-hdpi folder. and i called images in my activity like this : private Integer[] imageIDs = { R.drawable.wall1, R.dr...

Previous Next