Click here to Skip to main content
15,561,769 members
Home / Discussions / Android
   

Android

 
QuestionRe: Want to keep bluetooth device connection in entire application. Bluetooth connection is lost while switch to another activity ... ? Pin
David Crow29-Aug-16 17:36
David Crow29-Aug-16 17:36 
GeneralRe: Want to keep bluetooth device connection in entire application. Bluetooth connection is lost while switch to another activity ... ? Pin
Utkarsh Joshi 13-Sep-16 22:09
Utkarsh Joshi 13-Sep-16 22:09 
AnswerRe: Want to keep bluetooth device connection in entire application. Bluetooth connection is lost while switch to another activity ... ? Pin
Utkarsh Joshi 13-Sep-16 21:59
Utkarsh Joshi 13-Sep-16 21:59 
QuestionProblem with custom row in List View Pin
Andy_Bell26-Aug-16 10:38
Andy_Bell26-Aug-16 10:38 
QuestionRe: Problem with custom row in List View Pin
David Crow26-Aug-16 11:02
David Crow26-Aug-16 11:02 
AnswerRe: Problem with custom row in List View Pin
Andy_Bell26-Aug-16 11:50
Andy_Bell26-Aug-16 11:50 
SuggestionRe: Problem with custom row in List View Pin
David Crow26-Aug-16 16:29
David Crow26-Aug-16 16:29 
QuestionHow download picture Pin
Andy_Bell25-Aug-16 13:21
Andy_Bell25-Aug-16 13:21 
Good evening.

I try to download picture form url and insert in Image View. I use this code to do it:

public Bitmap getBitmapFromURL(String src) {
        Bitmap myBitmap = null;
        try {
            java.net.URL url = new java.net.URL(src);
            HttpURLConnection connection =    (HttpURLConnection) url
                    .openConnection();
            connection.setDoInput(true);
            connection.connect();
            InputStream input = connection.getInputStream();
            myBitmap = BitmapFactory.decodeStream(input);
            return myBitmap;
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        }
    }


I just want to ask you, there is problem to do so, or is it inefficient?
Closing this application, remains the downloaded picture remains in memory?
If I want to free memory resource, how can I cancel this files (accumulated in time)?
AnswerRe: How download picture Pin
Richard MacCutchan25-Aug-16 21:45
mveRichard MacCutchan25-Aug-16 21:45 
GeneralRe: How download picture Pin
Andy_Bell26-Aug-16 0:25
Andy_Bell26-Aug-16 0:25 
GeneralRe: How download picture Pin
Richard MacCutchan26-Aug-16 1:02
mveRichard MacCutchan26-Aug-16 1:02 
GeneralRe: How download picture Pin
Andy_Bell26-Aug-16 4:35
Andy_Bell26-Aug-16 4:35 
GeneralRe: How download picture Pin
Richard MacCutchan26-Aug-16 4:45
mveRichard MacCutchan26-Aug-16 4:45 
GeneralRe: How download picture Pin
Andy_Bell26-Aug-16 5:35
Andy_Bell26-Aug-16 5:35 
GeneralRe: How download picture Pin
Richard MacCutchan26-Aug-16 5:40
mveRichard MacCutchan26-Aug-16 5:40 
GeneralRe: How download picture Pin
Andy_Bell26-Aug-16 6:12
Andy_Bell26-Aug-16 6:12 
SuggestionRe: How download picture Pin
David Crow26-Aug-16 8:03
David Crow26-Aug-16 8:03 
Questionandroid: Using Global Multidimensional array variable in CustomView Pin
Member 984019022-Aug-16 19:32
Member 984019022-Aug-16 19:32 
AnswerRe: android: Using Global Multidimensional array variable in CustomView Pin
Richard MacCutchan22-Aug-16 23:12
mveRichard MacCutchan22-Aug-16 23:12 
PraiseRe: android: Using Global Multidimensional array variable in CustomView Pin
Member 984019023-Aug-16 18:58
Member 984019023-Aug-16 18:58 
QuestionRe: android: Using Global Multidimensional array variable in CustomView Pin
David Crow24-Aug-16 4:38
David Crow24-Aug-16 4:38 
JokeRe: android: Using Global Multidimensional array variable in CustomView Pin
Richard MacCutchan24-Aug-16 5:51
mveRichard MacCutchan24-Aug-16 5:51 
QuestionAndroid app (SourceCode) Pin
Member 126710159-Aug-16 21:07
Member 126710159-Aug-16 21:07 
AnswerRe: Android app (SourceCode) Pin
Richard MacCutchan9-Aug-16 22:16
mveRichard MacCutchan9-Aug-16 22:16 
QuestionHow to deal with Sending Data Between 2 RecyclerViews Android Java Pin
Lutaaya Huzaifah Idris8-Aug-16 4:59
Lutaaya Huzaifah Idris8-Aug-16 4:59 

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.