android-intent

No Activity found to handle Intent { act=android.intent.action.DIAL }

佐手、 提交于 2021-01-27 05:55:23
问题 I want to open my phone dialer .But it shows error. I have declared permissions for CALL_PHONE on Android Manifest and also declared class in Android Manifest. case R.id.action_call: Log.d("Action_call","INside Action call"); Intent dialer = new Intent(Intent.ACTION_DIAL); startActivity(dialer); return true; 回答1: You don't need any permissions for ACTION_DIAL Intent. So remove CALL_PHONE permission from AndroidManifest.xml . You have not pass any number to fire dial Intent. Use tel: followed

How to make ssh client in android

岁酱吖の 提交于 2021-01-27 04:58:11
问题 I want to make an android phone application for monitoring the router and its configuration using a ssh client like connectbot. Monitoring application is complete, but for setup not yet.How to connecting connectbot with mya android application that I created in eclipse, if I use the intent to connectbot? thanks ..... 回答1: Connectbot is open source, so you could just reuse their code, if the license fits your needs: http://code.google.com/p/connectbot/ 来源: https://stackoverflow.com/questions

Perform calls in Android Locktask mode

喜你入骨 提交于 2021-01-24 08:15:37
问题 TL;DR How to make a phone call while using Activity.startLockTask() ? I'm trying to setup a restricted environment on an Android device, i.e. what is usually called "Kiosk-Mode". Official documentation can be found here: https://developer.android.com/work/cosu.html The official way of doing this suggest to use Activity.startLockTask. This works fine until you want to start other apps from within your Activity which is in startLockTask() mode. Any activity that launches must not start on a new

Getting the user's location in Android when the phone is locked

泪湿孤枕 提交于 2021-01-23 01:55:21
问题 I am looking for a solution to get the user's location in a specific time-interval in Android API 17 (Android 4.2) and when the phone is locked. I've already tried some different code, checked a lot tutorials and searched almost everywhere on the web. The solution might be there, but I think it's a combination of lack of experience with Android developing and interpreting the different right solutions and approaches. At first I had some pretty basic code, which worked very well when the

Getting the user's location in Android when the phone is locked

眉间皱痕 提交于 2021-01-23 01:54:16
问题 I am looking for a solution to get the user's location in a specific time-interval in Android API 17 (Android 4.2) and when the phone is locked. I've already tried some different code, checked a lot tutorials and searched almost everywhere on the web. The solution might be there, but I think it's a combination of lack of experience with Android developing and interpreting the different right solutions and approaches. At first I had some pretty basic code, which worked very well when the

starting android service using explicit vs implicit intent

流过昼夜 提交于 2021-01-21 04:01:37
问题 According to the standard Android documentation, the prefered way to start a service (started service that is) is to use an explicit intent like this: // Using explicit intent: Intent serviceIntent = new Intent(getApplicationContext(), MyService.class); // or: Intent serviceIntent = new Intent(this, MyService.class); startService(serviceIntent); You can also start/stop a service using an implicit intent with an action string specified in the manifest, like this: // Using implicit intent:

passing data from on click function of my recycler adaptor

故事扮演 提交于 2021-01-20 07:20:07
问题 public void onClick(View v) { Intent intent = new Intent(context,notification.class); Bundle bundle = new Bundle(); bundle.putSerializable("DATA",listmsgs.get(getPosition())); intent.putExtras(bundle); context.startActivity(intent); } in the bundle object i'm getting data of item click and when i'm trying to use this data in notification activity i'm not getting data only one value im getting. or suggest me any another solution this is my notification activity notif data = (notif)getIntent()

Android how to start activity without intent or backround

最后都变了- 提交于 2021-01-18 07:05:46
问题 Suppose I have two activities A and B activity A which contains a button I want to start Activity B when I press Button without intent. 回答1: According the Oficial Documentation: An intent is an abstract description of an operation to be performed. It can be used with startActivity to launch an Activity , broadcastIntent to send it to any interested BroadcastReceiver components, and startService(Intent) or bindService(Intent, ServiceConnection, int) to communicate with a background Service. An

Android how to start activity without intent or backround

帅比萌擦擦* 提交于 2021-01-18 07:05:13
问题 Suppose I have two activities A and B activity A which contains a button I want to start Activity B when I press Button without intent. 回答1: According the Oficial Documentation: An intent is an abstract description of an operation to be performed. It can be used with startActivity to launch an Activity , broadcastIntent to send it to any interested BroadcastReceiver components, and startService(Intent) or bindService(Intent, ServiceConnection, int) to communicate with a background Service. An

Can't open file from intent in Android 10

拟墨画扇 提交于 2021-01-05 09:15:22
问题 I'm trying to access a file from Intent.ACTION_GET_CONTENT, when I try it on my device (which is Android 8), it works perfectly fine. But then, when I try it on my friends' device (Android 10), it's not working. When I try to open the file from Word it keeps say that "Can't open file. Try saving the file on the device and then opening it." And when I open a pdf file, it doesn't show anything, just black screen. btn_add OnClick Listener btn_add.setOnClickListener(new View.OnClickListener() {