Click here to Skip to main content
15,905,963 members
Home / Discussions / Android
   

Android

 
QuestionRe: Make a call from my contact list Pin
David Crow22-Sep-16 2:23
David Crow22-Sep-16 2:23 
QuestionAndroid - Information leakage flaw OutputStream Pin
Member 1235809712-Sep-16 21:24
Member 1235809712-Sep-16 21:24 
QuestionRe: Android - Information leakage flaw OutputStream Pin
David Crow13-Sep-16 3:23
David Crow13-Sep-16 3:23 
AnswerRe: Android - Information leakage flaw OutputStream Pin
Afzaal Ahmad Zeeshan13-Sep-16 7:10
professionalAfzaal Ahmad Zeeshan13-Sep-16 7:10 
GeneralRe: Android - Information leakage flaw OutputStream Pin
Member 1235809720-Sep-16 20:56
Member 1235809720-Sep-16 20:56 
GeneralRe: Android - Information leakage flaw OutputStream Pin
Richard MacCutchan20-Sep-16 22:16
mveRichard MacCutchan20-Sep-16 22:16 
GeneralRe: Android - Information leakage flaw OutputStream Pin
Member 1235809720-Sep-16 23:46
Member 1235809720-Sep-16 23:46 
GeneralRe: Android - Information leakage flaw OutputStream Pin
Member 1235809720-Sep-16 23:55
Member 1235809720-Sep-16 23:55 
here is the complete code ,

        Bitmap bitmap = null;
        Uri uri = null;
if (destType == FILE_URI || destType == NATIVE_URI) {
            if (this.saveToPhotoAlbum) {
                Uri inputUri = getUriFromMediaStore();
                try {
                    //Just because we have a media URI doesn't mean we have a real file, we need to make it
                    uri = Uri.fromFile(new File(FileHelper.getRealPath(inputUri, this.cordova)));

                } catch (NullPointerException e) {
                    uri = null;
                }
            } else {
                uri = Uri.fromFile(new File(getTempDirectoryPath(), System.currentTimeMillis() + ".jpg"));
            }

            if (uri == null) {
                this.failPicture("Error capturing image - no media storage found.");
                return;
            }

            // If all this is true we shouldn't compress the image.
            if (this.targetHeight == -1 && this.targetWidth == -1 && this.mQuality == 100 &&
                    !this.correctOrientation) {
                writeUncompressedImage(uri);

                this.callbackContext.success(uri.toString());
            } else {
                bitmap = getScaledBitmap(FileHelper.stripFileProtocol(imageUri.toString()));

                if (rotate != 0 && this.correctOrientation) {
                    bitmap = getRotatedBitmap(rotate, bitmap, exif);
                }
// warning is for below line ,
                try (OutputStream os = this.cordova.getActivity().getContentResolver().openOutputStream(uri)) {

                    bitmap.compress(Bitmap.CompressFormat.JPEG, this.mQuality, os);

                }


i tried using try resource but no luck still getting warning:
try (OutputStream os = this.cordova.getActivity().getContentResolver().openOutputStream(uri))

GeneralRe: Android - Information leakage flaw OutputStream Pin
Richard MacCutchan21-Sep-16 1:57
mveRichard MacCutchan21-Sep-16 1:57 
GeneralRe: Android - Information leakage flaw OutputStream Pin
Member 1235809721-Sep-16 3:13
Member 1235809721-Sep-16 3:13 
GeneralRe: Android - Information leakage flaw OutputStream Pin
Richard MacCutchan21-Sep-16 3:37
mveRichard MacCutchan21-Sep-16 3:37 
QuestionInvestigate Which App controls Infrared???? Pin
Member 127177612-Sep-16 13:54
Member 127177612-Sep-16 13:54 
JokeRe: Investigate Which App controls Infrared???? Pin
Richard MacCutchan2-Sep-16 21:10
mveRichard MacCutchan2-Sep-16 21:10 
GeneralRe: Investigate Which App controls Infrared???? Pin
Member 127177613-Sep-16 6:16
Member 127177613-Sep-16 6:16 
GeneralRe: Investigate Which App controls Infrared???? Pin
Richard MacCutchan3-Sep-16 6:29
mveRichard MacCutchan3-Sep-16 6:29 
GeneralRe: Investigate Which App controls Infrared???? Pin
Member 127177613-Sep-16 8:51
Member 127177613-Sep-16 8:51 
GeneralRe: Investigate Which App controls Infrared???? Pin
Richard MacCutchan3-Sep-16 20:40
mveRichard MacCutchan3-Sep-16 20:40 
GeneralRe: Investigate Which App controls Infrared???? Pin
Member 1235809720-Sep-16 23:52
Member 1235809720-Sep-16 23:52 
GeneralRe: Investigate Which App controls Infrared???? Pin
Richard MacCutchan21-Sep-16 1:59
mveRichard MacCutchan21-Sep-16 1:59 
GeneralI need some intermediate/advance android books to futhur increase my knowledge? Pin
Member 118283651-Sep-16 19:43
Member 118283651-Sep-16 19:43 
GeneralRe: I need some intermediate/advance android books to futhur increase my knowledge? Pin
Richard MacCutchan1-Sep-16 21:10
mveRichard MacCutchan1-Sep-16 21:10 
SuggestionRe: I need some intermediate/advance android books to futhur increase my knowledge? Pin
David Crow2-Sep-16 16:09
David Crow2-Sep-16 16:09 
QuestionRealize multipage app Pin
Andy_Bell1-Sep-16 12:14
Andy_Bell1-Sep-16 12:14 
AnswerRe: Realize multipage app Pin
Afzaal Ahmad Zeeshan4-Sep-16 0:43
professionalAfzaal Ahmad Zeeshan4-Sep-16 0:43 
QuestionWant to keep bluetooth device connection in entire application. Bluetooth connection is lost while switch to another activity ... ? Pin
utkarsh.incarnate26-Aug-16 19:48
utkarsh.incarnate26-Aug-16 19:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.