<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2" -->
<rss version="2.0">
    <channel>
        <title>Lowyat.NET: Latest topics by shahafnan</title>
        <description></description>
        <link>http://forum.lowyat.net/</link>
        <lastBuildDate>Wed, 02 Dec 2026 10:06:00 +0800</lastBuildDate>
        <generator>FeedCreator 1.7.2</generator>
        <item>
            <title>Android Studio Spinner Intent Problem</title>
            <link>http://forum.lowyat.net/topic/4784197</link>
            <description>I new in programing, I just make an apps, but the problem is that I try to send the selected data from the spinner ( A101,A102,A103,A104,A105) for example I select A102, then A102 will be send to Alarm Broadcast Reciever and then make a Toast A102, but the problem is that I try check the data that being receive from the alarm using Log. The data that being send is not the same from the data the I selected in the spinner. Like i said before I select A102 but from the Log i see that the data that is send is A104, sometimes it can be A103 or A101. But there is a time that the data that recieve is same what i select from the spinner. Below i include my code :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hope anyone can help with my problem.&lt;br /&gt;&lt;br /&gt;    // Spinner on class&lt;br /&gt;    &lt;br /&gt;            ArrayAdapter&amp;lt;CharSequence&amp;gt; adapter = ArrayAdapter.createFromResource(this,&lt;br /&gt;                    R.array.blockA, android.R.layout.simple_spinner_item);&lt;br /&gt;            adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);&lt;br /&gt;            class_number.setAdapter(adapter);&lt;br /&gt;            class_number.setOnItemSelectedListener(this);&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;            //Pick Start Time&lt;br /&gt;    &lt;br /&gt;            btnAddData.setOnClickListener(new View.OnClickListener() {&lt;br /&gt;                @Override&lt;br /&gt;                public void onClick(View v) {&lt;br /&gt;    &lt;br /&gt;                    // Set Alarm&lt;br /&gt;    &lt;br /&gt;                    setAlarm(tms);&lt;br /&gt;    &lt;br /&gt;     public void onItemSelected(AdapterView&amp;lt;?&amp;gt; parent, View view, int position, long id) {&lt;br /&gt;    &lt;br /&gt;            text = parent.getItemAtPosition(position).toString();&lt;br /&gt;            text2 = parent.getSelectedItem().toString();&lt;br /&gt;            Toast.makeText(parent.getContext(), &amp;quot;Kelas :&amp;quot; + text, Toast.LENGTH_SHORT).show();&lt;br /&gt;            classnumberD.setText(text);&lt;br /&gt;    &lt;br /&gt;        }&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;        public void onNothingSelected(AdapterView&amp;lt;?&amp;gt; parent) {&lt;br /&gt;    &lt;br /&gt;        }&lt;br /&gt;    &lt;br /&gt;    private void setAlarm(Long timeInMillis) {&lt;br /&gt;            //getting the alarm manager&lt;br /&gt;            AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;            //creating a new intent specifying the broadcast receiver&lt;br /&gt;            Intent intent = new Intent(this, MyAlarm.class);&lt;br /&gt;            intent.putExtra(&amp;quot;classnnumberD&amp;quot;,class_number.getOnItemSelectedListener().toString());&lt;br /&gt;            intent.putExtra(&amp;quot;notificationId&amp;quot;, notificationId);&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;            //creating a pending intent using the intent&lt;br /&gt;            PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, intent, 0);&lt;br /&gt;    &lt;br /&gt;            //setting the repeating alarm that will be fired every day&lt;br /&gt;            alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, timeInMillis, AlarmManager.INTERVAL_DAY, pendingIntent);&lt;br /&gt;            Toast.makeText(this, &amp;quot;Alarm is set&amp;quot;, Toast.LENGTH_SHORT).show();&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;</description>
            <author>shahafnan</author>
            <category>Codemasters</category>
            <pubDate>Sun, 26 May 2019 13:32:47 +0800</pubDate>
        </item>
        <item>
            <title>Android Studio Multiple Alarm and SQlite</title>
            <link>http://forum.lowyat.net/topic/4769085</link>
            <description>&lt;br /&gt;&lt;br /&gt;I need to build an apps that trigger an multiple alarm that being store in the Sqlite database, what i have done i manage to input a date/time into the sqlite database, but i dont know on how to retrieve this date/time an make it trigger the alarm. I have try and learn on how to make simple alarm but with only 1 alarm set based on a time picker not from date/time from sqlite datebase .Can anybody give me some tips and guide on how to retrieve the date/time from the sqlite then make the alarm trigger based on the date/time from sqlite. btw i read from other forum that said it more easy to store the alarm and retrieve it in milisecond rather then other format, can anyone explain to me why is that.&lt;br /&gt;&lt;br /&gt;Sorry because im asking to much because im still new in learning programing.&lt;br /&gt;</description>
            <author>shahafnan</author>
            <category>Codemasters</category>
            <pubDate>Sun, 21 Apr 2019 13:48:00 +0800</pubDate>
        </item>
    </channel>
</rss>
