android-intent

Android image button open new activity

可紊 提交于 2020-01-07 08:26:08
问题 I would like to open new activity from an image button in android. I tried with this code, but doesn't work. main.class import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.content.Context; import android.view.View; import android.widget.ImageButton; public class main extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); openMenu(); } public void

How to get alert dialog only after disconnect call?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-07 08:02:17
问题 In my app i am doing one thing that,when the call is disconnected by caller or receiver,one alert dialog should appear with cellphone number.it all works fine but issue is alert dialog is also appearing when i am getting call,but i only want only after disconnection,i don't know what is mistake i am making following is my code..can any one help? public class MyCallReceiver extends BroadcastReceiver { private String incomingNumber; @Override public void onReceive(Context context, Intent intent

How to get alert dialog only after disconnect call?

我是研究僧i 提交于 2020-01-07 08:01:12
问题 In my app i am doing one thing that,when the call is disconnected by caller or receiver,one alert dialog should appear with cellphone number.it all works fine but issue is alert dialog is also appearing when i am getting call,but i only want only after disconnection,i don't know what is mistake i am making following is my code..can any one help? public class MyCallReceiver extends BroadcastReceiver { private String incomingNumber; @Override public void onReceive(Context context, Intent intent

issue to pass arraylist from an intent to another

一世执手 提交于 2020-01-07 06:58:35
问题 Before asking here, i first search how to pass an arraylist from an intent to another. Thanks to one of the post made on SO, I thought i found a way to do so. The thing is, when i try to display the elements from the arraylist of my target activity, i only get one of the numerous elements i originally have in my departure activity. To put it in clear, here is my code in my fisrt activity : HashMap map = new HashMap<String,String>(); map.put("key1","value1"); map.put("key2","value2");

How do I start another activity when a button defined in main.xml is clicked

爷,独闯天下 提交于 2020-01-07 06:23:06
问题 I have two classes. One is Main and the other is HelloWorld. When I click a button which is defined in main.xml I want it to display a message defined in HelloWorld class to start. When i click the button it does not do anything.Code is given below. If anything else is required to put up let me know. Thanks Main.java public class Main extends MapActivity implements LocationListener { /** Called when the activity is first created. */ MapView map; long start; long stop; int x, y; GeoPoint

Listactivity With Text and Button Click Strange Behavior

僤鯓⒐⒋嵵緔 提交于 2020-01-07 06:22:00
问题 i have a listactivity app , each row cotain TEXT and BUTTON , both text and button must be clickable (what im try to get it ) , when click the text it will open MyDay activity and when click button it will open My_videos activity . whats happen exactly when you open the app and click on any button , it do no click action in any button in all rows , but when you click any row text so it will open MyDay activity then click any button in the first row ONLY , it will open My_videos activity which

Listactivity With Text and Button Click Strange Behavior

若如初见. 提交于 2020-01-07 06:21:06
问题 i have a listactivity app , each row cotain TEXT and BUTTON , both text and button must be clickable (what im try to get it ) , when click the text it will open MyDay activity and when click button it will open My_videos activity . whats happen exactly when you open the app and click on any button , it do no click action in any button in all rows , but when you click any row text so it will open MyDay activity then click any button in the first row ONLY , it will open My_videos activity which

how to click each items from list view and go to different activitys?

巧了我就是萌 提交于 2020-01-07 06:16:14
问题 I have a search bar in the first page of application. when i write to the search bar, it opens the search assist (list view for help). i want when i click each item of the list view go to different activity of application , but just get to the TestPage.class . don't work for TestPge2.class import java.util.ArrayList; import java.util.HashMap; import java.util.List; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android

Android - SMS - intent-filters priority listing

时光总嘲笑我的痴心妄想 提交于 2020-01-07 05:41:20
问题 I was wondering if it is possible to find a list that includes all the receivers associated to a certain action. For example I have the following receiver that executes everytime that an SMS is received: <receiver android:name=".SmsReceiver" android:enabled="true"> <intent-filter android:priority="101"> <action android:name="android.provider.Telephony.SMS_RECEIVED" /> </intent-filter> </receiver> So with the priority="101" it´s executed even before than the default message service in Android.

Share file to another app (whatsapp, telegram, gmail)

爷,独闯天下 提交于 2020-01-07 05:01:08
问题 I'm developing an android app using Xamarin.Forms. So far i did not found too much difficulties during the development, but now i think i'm missing something. I would like to: share a custom file (*.sl) from my app to any app that can handle Attachments (like whatsapp, telegram, gmail.. etc) Open my custom file (*.sl) with my app So, i digged a bit around the web and ended up with this; In my AndroidManifest.xml to handle my custom file <intent-filter> <action android:name="android.intent