Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3977154
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:53:23+00:00 2026-05-20T04:53:23+00:00

This is probably two questions in one…. Firstly i wonder how does android run

  • 0

This is probably two questions in one….

Firstly i wonder how does android run the code, is it step by step. The reason i ask this is because at the moment what i am trying to do is decrypt an image and them display it. However, the problem i think is that the code is adding the bitmap image too fast before it is decrypted. Should it run the code line by line?

Secondly Eclipse gives stack error etc but i dont know how to read the stack, is there a way to set it to just say this is the line in the code which is causing the problem?

thanks

EDIT

      DesEncrypter encrypter = new DesEncrypter();
      File Directory = new File(Environment.getExternalStorageDirectory()+"/Temp");
      FileInputStream iFile = new FileInputStream(new File("/sdcard/Images/"+Id+".jpg"));
      FileOutputStream fos = new FileOutputStream(Directory+"/"+Id+".jpg");
      encrypter.frontDecrypt(iFile, fos);       
      File file = new File(Environment.getExternalStorageDirectory()+"/Temp/"+Id+".jpg");
      if(file.exists()){
         bm = BitmapFactory.decodeFile(Environment.getExternalStorageDirectory()+"/Temp/"+Id+".jpg");
      }
      else{
         bm = BitmapFactory.decodeResource(getResources(), R.drawable.avatar);
      }
    }
    catch(Exception e){}
    iv.setImageBitmap(bm);

This code seems to work now and then, i think sometimes the bm isnt added correctly. Even if there is no image it should add one from the resource but does not do so.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:53:23+00:00Added an answer on May 20, 2026 at 4:53 am

    Obviously code is executed line by line but there are some methods that runs async so they return immediately but execution still continues

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is probably one of those questions where the answer really should be too
This is two questions in one but hopefully trivial to a C++ developer. How
this is really two questions in one I guess. We've developed a .Net app
This is a quick (and probably stupid) question but if I have two consts
I have two questions. 1) I found a little gem of code for how
Alright this probably is the worst error I have found ever. I have two
This questions doesn't let me sleep as it's since one year I'm trying to
I'm looking at some code with this form: 1 package com.stackoverflow.java.questions; 2 import java.util.ArrayList;
I have two questions: 1) Why is my code adding a carriage return at
I barely understand rails, let alone ruby, so this is probably an easy one.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.