<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic to an extent you will have to in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925363#M13735</link>
    <description>&lt;P&gt;to an extent you will have to bank on Java capabilities. I saw some examples which you can use for Random number generation. Other answers here in this thread is also very valid.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.javapractices.com/topic/TopicAction.do?Id=62"&gt;http://www.javapractices.com/topic/TopicAction.do?Id=62&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jul 2013 09:26:20 GMT</pubDate>
    <dc:creator>Raghavendr_U_Intel</dc:creator>
    <dc:date>2013-07-18T09:26:20Z</dc:date>
    <item>
      <title>Android random function</title>
      <link>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925349#M13721</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm learning &amp;nbsp;to developer on android, and I'm making a exercise of Sharedpreferences, but I don't know how to generate a random number and show into textview on my app.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2013 06:15:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925349#M13721</guid>
      <dc:creator>JLuna5</dc:creator>
      <dc:date>2013-01-28T06:15:50Z</dc:date>
    </item>
    <item>
      <title>Estoy aprendiendo a</title>
      <link>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925350#M13722</link>
      <description>&lt;P&gt;Estoy aprendiendo a desarrolladores en Android, y estoy haciendo un ejercicio de Sharedpreferences, pero no sé cómo generar un número aleatorio y mostrar en TextView en mi aplicación.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2013 06:16:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925350#M13722</guid>
      <dc:creator>JLuna5</dc:creator>
      <dc:date>2013-01-28T06:16:09Z</dc:date>
    </item>
    <item>
      <title>Hi JudLup</title>
      <link>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925351#M13723</link>
      <description>&lt;P&gt;Hi JudLup&lt;/P&gt;
&lt;P&gt;Sadly I do not know Android platform,but Android is written in Java and probably has built in math library.I would also recommend you to check posibility of importing Java classes.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2013 07:04:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925351#M13723</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2013-01-28T07:04:24Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;... I don't know how to</title>
      <link>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925352#M13724</link>
      <description>&amp;gt;&amp;gt;... I don't know how to generate a random number...

Here is example:
...
        class &lt;STRONG&gt;TestSet&lt;/STRONG&gt;
{
...
            TestSet()
            {
                float r = ( ( float ) &lt;STRONG&gt;Math.random()&lt;/STRONG&gt; - 0.5f ) * 0.2f;
...
            }
...
}</description>
      <pubDate>Mon, 28 Jan 2013 15:18:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925352#M13724</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-01-28T15:18:13Z</dc:date>
    </item>
    <item>
      <title>you can use "math.random".</title>
      <link>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925353#M13725</link>
      <description>&lt;P&gt;you can use "math.random". this methode generate a number between 0 and 1. you can multlply it with the max number that you want to reach.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2013 12:33:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925353#M13725</guid>
      <dc:creator>Mohamed_helmi_b_</dc:creator>
      <dc:date>2013-04-18T12:33:14Z</dc:date>
    </item>
    <item>
      <title>Here are some examples with</title>
      <link>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925354#M13726</link>
      <description>&lt;P&gt;Here are some examples with results :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Math.random()&lt;/P&gt;
&lt;P&gt;Math.round(Math.random()*10); // 1 digit random&lt;/P&gt;
&lt;P&gt;Math.round(Math.random()*100); //2 digit random&lt;/P&gt;
&lt;P&gt;Math.round(Math.random()*1000); //3 digit random&lt;/P&gt;
&lt;P&gt;Results:&lt;/P&gt;
&lt;P&gt;Math random value :0.8393086905318781&lt;/P&gt;
&lt;P&gt;Math random value :3&lt;/P&gt;
&lt;P&gt;Math random value :82&lt;/P&gt;
&lt;P&gt;Math random value :719&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2013 19:03:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925354#M13726</guid>
      <dc:creator>Mohamed_Ali_A_</dc:creator>
      <dc:date>2013-04-18T19:03:51Z</dc:date>
    </item>
    <item>
      <title>Hi JudLup Luna,</title>
      <link>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925355#M13727</link>
      <description>&lt;P&gt;&lt;B&gt;Hi&amp;nbsp;&lt;A href="http://software.intel.com/en-us/user/510202"&gt;JudLup Luna&lt;/A&gt;,&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;try this example code it can help you&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;BR /&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;BR /&gt;&amp;lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"&lt;BR /&gt;android:orientation="vertical"&lt;BR /&gt;android:layout_width="fill_parent"&lt;BR /&gt;android:layout_height="fill_parent"&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;lt;TextView&lt;BR /&gt;android:layout_width="fill_parent"&lt;BR /&gt;android:layout_height="wrap_content"&lt;BR /&gt;android:text="@string/hello"&lt;BR /&gt;/&amp;gt;&lt;BR /&gt;&amp;lt;Button&lt;BR /&gt;android:layout_width="fill_parent"&lt;BR /&gt;android:layout_height="wrap_content"&lt;BR /&gt;android:text="Generate Random number"&lt;BR /&gt;android:id="@+id/generate"&lt;BR /&gt;/&amp;gt;&lt;BR /&gt;&amp;lt;TextView&lt;BR /&gt;android:layout_width="fill_parent"&lt;BR /&gt;android:layout_height="wrap_content"&lt;BR /&gt;android:id="@+id/generatenumber"&lt;BR /&gt;/&amp;gt;&lt;BR /&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/B&gt;&lt;B&gt;&lt;BR /&gt;&lt;/B&gt;&lt;B&gt;&lt;BR /&gt;&lt;/B&gt;&lt;B&gt;RandomNumber.java&lt;/B&gt;&lt;B&gt;&lt;BR /&gt;&lt;/B&gt;&lt;B&gt;import java.util.Random;&lt;BR /&gt;&lt;BR /&gt;import android.app.Activity;&lt;BR /&gt;import android.os.Bundle;&lt;BR /&gt;import android.view.View;&lt;BR /&gt;import android.view.View.OnClickListener;&lt;BR /&gt;import android.widget.Button;&lt;BR /&gt;import android.widget.TextView;&lt;BR /&gt;&lt;BR /&gt;public class RandomNumber extends Activity {&lt;BR /&gt;/** Called when the activity is first created. */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@Override&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public void onCreate(Bundle savedInstanceState) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super.onCreate(savedInstanceState);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setContentView(R.layout.main);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final Random myRandom = new Random();&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Button buttonGenerate = (Button)findViewById(R.id.generate);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final TextView textGenerateNumber = (TextView)findViewById(R.id.generatenumber);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; buttonGenerate.setOnClickListener(new OnClickListener(){&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@Override&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public void onClick(View v) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // TODO Auto-generated method stub&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; textGenerateNumber.setText(String.valueOf(myRandom.nextInt()));&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/B&gt;&lt;B&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;}&lt;/B&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2013 01:09:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925355#M13727</guid>
      <dc:creator>Ahmed_BH</dc:creator>
      <dc:date>2013-04-19T01:09:42Z</dc:date>
    </item>
    <item>
      <title>Hi iliyapolak, thank you for</title>
      <link>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925356#M13728</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="http://software.intel.com/en-us/user/542548"&gt;iliyapolak&lt;/A&gt;, thank you for you suggestion.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2013 20:59:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925356#M13728</guid>
      <dc:creator>JLuna5</dc:creator>
      <dc:date>2013-07-06T20:59:02Z</dc:date>
    </item>
    <item>
      <title>Hi Sergey Kostrov, Thank you</title>
      <link>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925357#M13729</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="http://software.intel.com/en-us/user/353909"&gt;Sergey Kostrov&lt;/A&gt;, Thank you for you suggestion.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2013 20:59:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925357#M13729</guid>
      <dc:creator>JLuna5</dc:creator>
      <dc:date>2013-07-06T20:59:55Z</dc:date>
    </item>
    <item>
      <title>Sergey Kostrov thank you!</title>
      <link>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925358#M13730</link>
      <description>&lt;P&gt;&lt;A href="http://software.intel.com/en-us/user/353909"&gt;Sergey Kostrov&lt;/A&gt;&amp;nbsp;thank you!&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2013 21:00:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925358#M13730</guid>
      <dc:creator>JLuna5</dc:creator>
      <dc:date>2013-07-06T21:00:31Z</dc:date>
    </item>
    <item>
      <title>Mohamed Ali A. thank you!</title>
      <link>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925359#M13731</link>
      <description>&lt;P&gt;&lt;A href="http://software.intel.com/en-us/user/811839"&gt;Mohamed Ali A.&lt;/A&gt;&amp;nbsp;thank you!&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2013 21:01:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925359#M13731</guid>
      <dc:creator>JLuna5</dc:creator>
      <dc:date>2013-07-06T21:01:09Z</dc:date>
    </item>
    <item>
      <title>HI Ahmed BH , thank you for</title>
      <link>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925360#M13732</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;A href="http://software.intel.com/en-us/user/811565"&gt;Ahmed BH&lt;/A&gt;&amp;nbsp;, thank you for you answer, this is very complete.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jul 2013 21:02:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925360#M13732</guid>
      <dc:creator>JLuna5</dc:creator>
      <dc:date>2013-07-06T21:02:15Z</dc:date>
    </item>
    <item>
      <title>there are random function</title>
      <link>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925361#M13733</link>
      <description>&lt;P&gt;there are random function class in java..&lt;/P&gt;
&lt;P&gt;random r= new random();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2013 06:57:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925361#M13733</guid>
      <dc:creator>Ashwin_S_Ashok</dc:creator>
      <dc:date>2013-07-18T06:57:05Z</dc:date>
    </item>
    <item>
      <title>Random random = new Random();</title>
      <link>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925362#M13734</link>
      <description>&lt;P&gt;Random random = new Random();&lt;/P&gt;
&lt;P&gt;int ran=random.nextInt(100);&lt;/P&gt;
&lt;P&gt;here is the code..&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2013 07:01:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925362#M13734</guid>
      <dc:creator>Ashwin_S_Ashok</dc:creator>
      <dc:date>2013-07-18T07:01:07Z</dc:date>
    </item>
    <item>
      <title>to an extent you will have to</title>
      <link>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925363#M13735</link>
      <description>&lt;P&gt;to an extent you will have to bank on Java capabilities. I saw some examples which you can use for Random number generation. Other answers here in this thread is also very valid.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.javapractices.com/topic/TopicAction.do?Id=62"&gt;http://www.javapractices.com/topic/TopicAction.do?Id=62&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2013 09:26:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Android-random-function/m-p/925363#M13735</guid>
      <dc:creator>Raghavendr_U_Intel</dc:creator>
      <dc:date>2013-07-18T09:26:20Z</dc:date>
    </item>
  </channel>
</rss>

