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

  • Home
  • SEARCH
  • 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 7798501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:01:41+00:00 2026-06-02T00:01:41+00:00

im wanting to get a String out of a public void and into my

  • 0

im wanting to get a String out of a public void and into my onCreate so i can Log it to check the hash is working. but i’m not sure how to do this

heres the my code

public class ChooseTeamActivity extends ListActivity {

    private static final String apiKey = "4545ggg454hfnf7557kfdkgg454"; 
    private static final String apiUser = "AndroidUser"; 

    long unixTimeStamp = System.currentTimeMillis() / 1000L;

    String newFeedRequest = "1.0/evoStructure?timestamp=" + unixTimeStamp;
    String fixturesFeedURL = "https://secure.TestSite.com/_services/api/" + newFeedRequest;

    public void hash() throws NoSuchAlgorithmException, UnsupportedEncodingException{

        MessageDigest md = MessageDigest.getInstance("SHA-256");
        md.update(fixturesFeedURL.getBytes("UTF-8"));
        byte[] digest = md.digest();
        String strhash = new String(digest);

    }   



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);

    setContentView(R.layout.chooseact);


     Log.v("myApp", fixturesFeedURL);
     Log.v("myApp", strhash);



    }

}
  • 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-06-02T00:01:43+00:00Added an answer on June 2, 2026 at 12:01 am

    i think you want to do this…

    public class ChooseTeamActivity extends ListActivity {
    
        private static final String apiKey = "4545ggg454hfnf7557kfdkgg454"; 
        private static final String apiUser = "AndroidUser"; 
    
        long unixTimeStamp = System.currentTimeMillis() / 1000L;
    
        String newFeedRequest = "1.0/evoStructure?timestamp=" + unixTimeStamp;
        String fixturesFeedURL = "https://secure.TestSite.com/_services/api/" + newFeedRequest;
    
        public void hash() throws NoSuchAlgorithmException, UnsupportedEncodingException{
    
            MessageDigest md = MessageDigest.getInstance("SHA-256");
            md.update(fixturesFeedURL.getBytes("UTF-8"));
            byte[] digest = md.digest();
            String strhash = new String(digest);
    
         Log.v("myApp", fixturesFeedURL);
         Log.v("myApp", strhash);
        }   
    
    
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            // TODO Auto-generated method stub
            super.onCreate(savedInstanceState);
    
        setContentView(R.layout.chooseact);
        try{ 
         hash();
          }catch(Exception e){
           }
    
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm wanting to get a WCF-over-TCP service working. I was having some problems with
Consider the following code :- public class UsingWait1{ public static void main(String... aaa){ CalculateSeries
I'm wanting to parse a string into a nullable int in C#. ie. I
I'm wanting to get the filepath ie /sites/default/files/myfile.pdf for my file uploads. I'm using
My table named pictures has a column named pic and I'm wanting to get
I'm wanting to run AJAX to get some URL data, build an object from
Wanting to integrate aspects of SharePoint into an existing website - rather than integrating
I'm wanting to extract a zip file loaded with images into memory in some
I'm wanting to figure out why the th checkbox never gets aligned with the
The PC Windows is sending the confirmation. But that is not arriving to Linux.

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.