Find Jobs
Hire Freelancers

Android Java Class to PHP

₹12500-37500 INR

Closed
Posted almost 6 years ago

₹12500-37500 INR

Paid on delivery
import [login to view URL]; import [login to view URL]; import [login to view URL]; import [login to view URL]; import [login to view URL]; import [login to view URL]; import [login to view URL]; import [login to view URL]; import [login to view URL]; import [login to view URL]; import [login to view URL]; import [login to view URL]; import [login to view URL]; import [login to view URL]; public class MainActivity extends AppCompatActivity { protected Map<String, Object> postArgs = new HashMap(); @Override protected void onCreate(Bundle savedInstanceState) { [login to view URL](savedInstanceState); setContentView(R.layout.activity_main); TextView err = (TextView) findViewById(R.id.hello_text); try { [login to view URL](generateSignature([login to view URL])); } catch (NoSuchAlgorithmException e) { [login to view URL](); } catch (JSONException e) { [login to view URL](); } catch (UnsupportedEncodingException e) { [login to view URL](); } } String json_string = "{\"country_version\":\"\",\"app_version\":1143,\"request_timestamp\":1526296840745,\"app_id\":\"[login to view URL]\",\"experiment_name\":\"browser_history_reporting\",\"hardware_id\":\"8052a17f75e496be\",\"instance_id\":\"3fd66651d6ab4d968109afdcd6fa7c21\"}"; public MainActivity() { [login to view URL]("country_version", ""); [login to view URL]("app_version", 1143); [login to view URL]("request_timestamp", "1526296840745"); [login to view URL]("app_id", "[login to view URL]"); [login to view URL]("experiment_name", "browser_history_reporting"); [login to view URL]("hardware_id", "8052a17f75e496be"); [login to view URL]("instance_id", "3fd66651d6ab4d968109afdcd6fa7c21"); } public JSONObject asJSON() throws JSONException { JSONObject root = new JSONObject(json_string); return root; } private String generateSignature(Map<String, Object> map) throws NoSuchAlgorithmException, JSONException, UnsupportedEncodingException { MessageDigest instance = [login to view URL]("SHA1"); updateHash(instance, asJSON()); byte[] digest = [login to view URL](); StringBuffer stringBuffer = new StringBuffer(); for (byte b : digest) { [login to view URL]([login to view URL]((b & 255) + 256, 16).substring(1)); } return [login to view URL](); } private void updateHash(MessageDigest messageDigest, JSONObject jSONObject) throws UnsupportedEncodingException, JSONException { JSONArray names = [login to view URL](); List<String> arrayList = new ArrayList(); for (int i = 0; i < [login to view URL](); i++) { [login to view URL]([login to view URL](i)); } [login to view URL](arrayList); for (String str : arrayList) { [login to view URL]([login to view URL]("UTF-8")); Object obj = [login to view URL](str); if (obj instanceof JSONObject) { updateHash(messageDigest, (JSONObject) obj); } else if (obj instanceof JSONArray) { updateHash(messageDigest, (JSONArray) obj); } else { [login to view URL]([login to view URL](obj).getBytes("UTF-8")); } } } private void updateHash(MessageDigest messageDigest, JSONArray jSONArray) throws JSONException, UnsupportedEncodingException { for (int i = 0; i < [login to view URL](); i++) { Object obj = [login to view URL](i); if (obj instanceof JSONObject) { updateHash(messageDigest, (JSONObject) obj); } else if (obj instanceof JSONArray) { updateHash(messageDigest, (JSONArray) obj); } else { [login to view URL]([login to view URL](obj).getBytes("UTF-8")); } } } }
Project ID: 16965580

About the project

7 proposals
Remote project
Active 6 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
7 freelancers are bidding on average ₹25,194 INR for this job
User Avatar
How are you? I have experience in your project, I can assure project with high quality. Please contact with me. Best Regards.
₹33,333 INR in 10 days
5.0 (395 reviews)
9.4
9.4
User Avatar
Hello Sir/Madam, I have gone through your post and delighted to say that I am looking forward to work with you. Having garnered years of experience and expertise in the relevant field, I am sure that I can swimmingly work on this project. We have years of experience and expertise in a gamut of technologies that include: • Php, Magento, Laravel, Wordpress, Android & ios etc • Web (Html, Laravel & Core Php, Wodpress, Joomla) • UI/UX Design (Photoshop & Illustrator) Let’s connect and kick start the project !!! For any query, feel free to connect me.
₹27,777 INR in 10 days
4.7 (18 reviews)
4.5
4.5
User Avatar
subirbetai, please message me, I have all relevant experience for you and my portfolio is guaranteed to impress you. I'm English and based in the United Kingdom. My communication, professionalism and development experience is the best quality standard you could ask for. Please message me ASAP! Please message me ASAP.
₹30,525 INR in 2 days
4.9 (8 reviews)
3.0
3.0
User Avatar
Sir/Madam, Good day! I'm a degree holder in Information technology and I'm a java programmer with more than 4 years experienced. I'm also flexible in any programming language. I'm highly motivated and hardworking. Please contact me now. Thank you!
₹16,666 INR in 10 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of INDIA
India
0.0
0
Member since Dec 4, 2017

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.