intent

Xamarin.Forms Android FileProvider: GrantWriteUriPermission not always working

匿名 (未验证) 提交于 2019-12-03 01:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to edit files from the internal storage of my Xamarin.Forms Android app in third party apps, for example fill out form elements in a PDF file or edit a .docx file. With my implementation the file gets correctly opened in the external app, but in certain apps it is opened read-only . Adobe Acrobat and Microsoft Word open the files read-only, while other apps like Google Docs are able to write back into the file. (I am using Microsoft Word with a valid Office365 subscription). My FileProvider in the AndroidManifest.xml: <provider

Is there an Intent for viewing documents (Word, Excel, Powerpoint, PDF, etc.) in Android? [duplicate]

匿名 (未验证) 提交于 2019-12-03 01:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Possible Duplicate: android: how do i open another app from my app? Is there an Intent to view files such as word document (.doc), excel sheet, powerpoint (.ppt), pdf, etc. in Android? 回答1: All you can do is, emit intent of specified MIME type. Android will handle what application(s) is capable to open it. Something like this solution should work: View MS office files in an android application 文章来源: Is there an Intent for viewing documents (Word, Excel, Powerpoint, PDF, etc.) in Android? [duplicate]

Notification bar - when clicked, how to open file explorer with specified location

匿名 (未验证) 提交于 2019-12-03 01:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I did a major update of my question because some misunderstandings. So, I have a notification. And when I click that notification, I want the file explorer app (third party app of course) opens. No matter whuch app is, if there's more than on file explorers, it should prompt the "open with" - and then open /sdcard/folder (if possible) My notification it's here on Listar.class NotificationManager manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); Notification notification = new Notification(R.drawable.ic_menu_save

android downloading multiple files with InputStream FileOutputStream

匿名 (未验证) 提交于 2019-12-03 01:00:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: So I have an app which downloads certain files, dedicated to a client of mine who is hosting his files on a remote location, and i'm doing so using the code below: public class DownloadService extends IntentService { private int result = Activity . RESULT_CANCELED ; public DownloadService () { super ( "DownloadService" ); } @Override protected void onHandleIntent ( Intent intent ) { String urlPath = intent . getStringExtra ( URL ); String fileName = intent . getStringExtra ( FILENAME ); File output = new File ( Environment .

geo: Intent with label (Android)

匿名 (未验证) 提交于 2019-12-03 01:00:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is there a working way (i heard that as of update 7.0 there were some changes) to display a marker with a position given by latitude/longitude with a label? geo:?q=latitude, longitude (Label) does not work... 回答1: Show point on google map via an intent. String uri = "geo:"+ latitude + "," + longitude; startActivity(new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri))); You can also choose to place a point like so: String uri = "geo:"+ latitude + "," + longitude + "?q=my+street+address"; startActivity(new Intent(android.content

Launch an activity of an application from a different application on Android

匿名 (未验证) 提交于 2019-12-03 01:00:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need to launch an activity (not the main activity) of an application from an application I have made. The activity I want to launch is proprietary, hence, I cannot make any changes to its code(or manifest). For example: I want to launch somebody's Facebook profile from my own application. A normal intent to facebook from my app would open the 'newsfeed'(which I don't want). I want to know how to access any other activity. Thanks in advance! The little code I have: String PACKAGE="com.facebook.katana"; Intent launchIntent =

How can I shadow the PackageManager with Robolectric

匿名 (未验证) 提交于 2019-12-03 01:00:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My Android application has a simple method to fire off an intent to display a URL. protected void launchBrowser(int id) { Uri uri = Uri.parse( getString( id ) ); Intent intent = new Intent( ACTION_VIEW, uri); PackageManager packageManager = getPackageManager(); List activities = packageManager.queryIntentActivities(intent, 0); if (activities.size() > 0) { startActivity(intent); } else { Toast.makeText(getApplicationContext(), "ERROR - no application to display a web page", Toast.LENGTH_SHORT).show(); } } I'm using Robolectric for unit

Android get vCard data from Intent

匿名 (未验证) 提交于 2019-12-03 00:59:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I use Intent.ACTION_SEND for receiving data in my app. How can I process sending of data type text/x-vcard ? When I use intent.getStringExtra(Intent.EXTRA_TEXT) , it's throws an exception. 回答1: This worked for me: Uri uri = (Uri) intent.getExtras().get(Intent.EXTRA_STREAM); uri.toString() gave me this: content://com.android.contacts/contacts/as_multi_vcard/2876r7-2A962A902A9045494F35.1957ifcf79ef7e82a0b99%3A2876r8-315551534945354F312D4F35.1957ieb4f1a6b0fcb82b9%3A2876r9-57493D3135452D3D43.1957ief585d48b64784c0%3A2876r10-4F35373D4343474959

Is it possible to check if a notification is visible or canceled?

匿名 (未验证) 提交于 2019-12-03 00:59:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I would like to update notification data, but the only way I found is to launch a new one with the same Id. The problem is that I don't want to raise a new one if the original has beed canceled. Is there a way to tell if a notification is visible or canceled? Or a way to update a notification only if it exists? 回答1: This is how I solved it: private boolean isNotificationVisible() { Intent notificationIntent = new Intent(context, MainActivity.class); PendingIntent test = PendingIntent.getActivity(context, MY_ID, notificationIntent,

Syntax error on tokens, AnnotationName expected instead - error on query

匿名 (未验证) 提交于 2019-12-03 00:59:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have received a Syntax error on tokens, AnnotationName expected instead occured on the following line: query.findInBackground(new FindCallback<ParseUser>() { I have been trying to troubleshoot since a while, but is still having difficulties. Below is my complete code public class Fragment1 extends Fragment { public interface Constants { String LOG = "com.dooba.beta"; } private String currentUserId; private ArrayAdapter<String> namesArrayAdapter; private ArrayList<String> names; private ArrayList<Images> alProfilePicture; private ListView