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 9123225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:17:16+00:00 2026-06-17T06:17:16+00:00

Hi all. I’m working on an app that scans the devices system info and

  • 0

Hi all. I’m working on an app that scans the devices system info and I was wondering if it was possible to add two strings:

  • String manufacturer = Build.MANUFACTURER;
  • String model = Build.MODEL;

to my MainActivity and display them on the screen somehow. Here is my MainActivity:

package com.shadycorp.diji.clock

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;
import android.support.v4.app.NavUtils;

public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
}
  • 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-17T06:17:17+00:00Added an answer on June 17, 2026 at 6:17 am

    In your layour activity_main add two TextViews with assigned IDs:

    <TextView
        android:id="@+id/manufacturer"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="left" />
    <TextView
        android:id="@+id/model"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="left" />
    

    Then, in your onCreate() method, after inflating the layout, find these TextViews using assigned IDs:

    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    TextView manufacturerTextView = (TextView)findViewById(R.id.manufacturer);
    TextView modelTextView = (TextView)findViewById(R.id.model);
    // Now you can set TextView's text using setText() method:
    manufacturerTextView.setText(Build.MANUFACTURER);
    modelTextView.setText(Build.MODEL);
    

    That’s all!

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

Sidebar

Related Questions

All reservations about unsecuring your SecureString by creating a System.String out of it aside
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
All -- I have these two methods in one of my classes: public static
All I want to do is return the index of the i that is
all. We're trying to get some intersect collisions working, but the problem experience is
All of a sudden, Facebook sharing has stopped working on my site. It's been
All code below is a stand-alone working example (greatly simplified) of what I am
All, There is a website that doesn't seem legitimate that and keeps showing all
All tables in a certain database have the exact columns, so I'm wondering if
All of my bootstrap code is working except the modal. The Modal shows, but

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.