android-intent

Programatically send SMS (Not getting delivery status) [duplicate]

不羁岁月 提交于 2019-12-25 05:22:01
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Programatically send SMS Android (Not receiving status) I am using this code example word for word except for the fact that I changed import android.telephony.gsm.SmsManager; to import android.telephony.SmsManager; The SMS is sending fine however I am not getting the TOAST message that it was delivered (sent to the network). I am trying to integrate SMS into my application and this is important. I am sure this

How can I get the context of other activity?

拥有回忆 提交于 2019-12-25 05:13:57
问题 I'm working on the alarm app, and have trouble removing an existing alarm. I have to create the same pending intent to remove the alarm in the activity which lists all alarms in my app, but It doesn't work as I expected. I want to get the "Context" from the activity which I used to add an alarm. Here is the code to add an alarm from ListAddActivity. private void addAlarm() { final int ALARM_CODE = this.getAlarmCode(1); final int HOUR_OF_DAY = vo.getHour1(); final int MINUTE = vo.getMinute1();

How to set and get the id for the items in the spinner in Android

久未见 提交于 2019-12-25 05:07:58
问题 I have a problem like I had a Spinner containing the Names of all developers working in the Company. I have used the ArrayAdapter with a Array having the names of all the developers which is fetched from the database. The problem is that when I update the Name Of Developer field, I get Only the Name of the Developer which is not enough to update the data as their can be multiple developers with the same name in the Company. So now I require the id of the developers to update it.. How to store

how to open more than one xml forms from a single main page

北慕城南 提交于 2019-12-25 05:04:39
问题 i am beginner to android plz help i hav a main page and i want to open one form on each button....but it is opening only one page the remaining pages gives error..... here is my xml code of main page <?xml version="1.0" encoding="utf-8"?> <SlidingDrawer xmlns:android="http://schemas.android.com/apk/res/android" android:background="@drawable/stars" android:id="@+id/slidingDrawer1" android:layout_width="match_parent" android:layout_height="match_parent" android:content="@+id/content" android

how to call a section of code every second in background in Android

烂漫一生 提交于 2019-12-25 04:57:07
问题 I want call the following portion of code every second?? I have tried the following- But don't know how to call every second?? How can I keep on calling new checkNWConnectivity().execute("Test"); everysecond and from where to call in my android program??? private class checkNWConnectivity extends AsyncTask<String, Integer, String> { @Override protected String doInBackground(String... params) { ConnectivityManager manager = (ConnectivityManager)getSystemService(MainActivity.CONNECTIVITY

Fragment returning null from intent

给你一囗甜甜゛ 提交于 2019-12-25 04:34:36
问题 So i made a bunch of 4 buttons , put an intent to each of them . They all navigate to the same Fragment class . But their extras are different, so if button1 was clicked , Fragment would open and do a certain action , if button2 was clicked , Fragment would do another action and so on. I tried the code on normal activities and it worked , but in fragments its not working . It just returns me "Id is null" Class sending the intent public class Intennt extends ActionBarActivity { Button bt1,bt2

Check whether its connected or not

时光怂恿深爱的人放手 提交于 2019-12-25 04:26:43
问题 The logcat output is this.. 01-30 06:34:43.633: D/AndroidRuntime(1228): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<< 01-30 06:34:43.643: D/AndroidRuntime(1228): CheckJNI is ON 01-30 06:34:43.703: D/dalvikvm(1228): Trying to load lib libjavacore.so 0x0 01-30 06:34:43.713: D/dalvikvm(1228): Added shared lib libjavacore.so 0x0 01-30 06:34:43.733: D/dalvikvm(1228): Trying to load lib libnativehelper.so 0x0 01-30 06:34:43.743: D/dalvikvm(1228): Added shared lib

Intent within fragment works only half the time

▼魔方 西西 提交于 2019-12-25 04:13:16
问题 I am trying to pass an intent with data from Activity A to FragmentActivity B to Fragment B. A button from Activity A starts FragmentActivity B. The "year" string sets a filter with which I query a mysql database on a remote server. The code below works but only half the time. I have no idea what causes it to filter just some times and at other times it just returns the whole table unfiltered. I am guessing it has to be related to the intent I am using in the fragment because the filter

How to intent a parse query?

冷暖自知 提交于 2019-12-25 04:12:19
问题 In parse i have a class A which has a column (relation) named - view, which relates to class B( contains different images with different object id's).Now what i want to achieve is that : in android i have a activity(A) which has a recycle view which shows all the items of class A. The items are clickable which when clicked brings up the items from class B in parse to activity(B) . Now the issue is we are unable to intent a parse query from activity (A) to activity(B), so that we can display

Intent not working properly in switch between different activities

回眸只為那壹抹淺笑 提交于 2019-12-25 04:09:25
问题 I have made an application with 5 activities-calculator1.java,calculator2.java,deposit.java,calculator3.java,calculator4.java respectively,In activity 1 there is a toggle button and a next button,and all the other activities contains a next button,Now i want is when toggle button is pressed and next button pressed then it should goto calculator2.java,and from calculator2.java,when i press next button,if the "toggleButton" of calculator.java is "on" it should go to deposit.java else go to