android-intent

Sharing bitmap in memory without asking for read permissions using ACTION_SEND

感情迁移 提交于 2019-12-25 09:17:23
问题 I am trying to store a bitmap within the app's storage using file provider and then share it via ACTION_SHARE, I am trying to avoid the read external storage permissions while sharing the image (it is the screenshot of the current view of the app -> bitmap). Though I add the FLAG_GRANT_READ_URI_PERMISSION flag the receiver app always asks for the permissions, if I grant the permissions then the image is accessible by the receiver app else the receiver app does not show the image. Can someone

how to call another activity using listview item row

青春壹個敷衍的年華 提交于 2019-12-25 08:57:32
问题 I am making an application in which fetching data from xml using url in listview, now i want to call another activity using listview item row, for example :- if user will click first listview row, then need to call item.class, actually i am able to call another activity if i will not use web url in next activity,but if i want to call activity that also fetching data from url using xml parser, then i am getting this error :- Unfortunately app has stopped, why, please someone tell me how can i

Clarification on Intents, Context and overriding default behaviour

╄→гoц情女王★ 提交于 2019-12-25 08:38:06
问题 To generalize, I understand my application can declare activities to handle specific intents (filtered by category and actions). I can declare my app to handle the ACTION_VIEW and somehow have it magically be registered as a browser to the system. How is this done? Is there a resource that anyone knows of to further read into how which action/category combination lets apps register themselves to the system as, say, browsers? Specifically, I'm wondering how I would be able to register my

Android intent filter: add attachment to SMS/MMS message

China☆狼群 提交于 2019-12-25 08:27:51
问题 What intent is fired when the user tries to add an attachment to an SMS/MMS message? I tried these and none of them work: GET_CONTENT with DEFAULT category and " / " mimeType PICK with DEFAULT category and " / " mimeType I also tried the above with categories OPENABLE and BROWSABLE. I can't find this documented ANYWHERE. It doesn't seem to be the same intent as the email attachment filter. Just to clarify, I'm talking about adding my app as an option in the dialog that appears when the user

Are context.startService() calls guaranteed to be aquired by the service in the same order they were sent?

六月ゝ 毕业季﹏ 提交于 2019-12-25 08:23:37
问题 Are context.startService() calls guaranteed to be aquired by the service in the same order they were sent? consider in activity: Intent intent; intent = new Intent(MyIntents.ADD_BATCH_ACTION); intent.putExtra(MyIntents.BATCH_ACTION_NAME, "Bake donuts"); startService(intent); intent = new Intent(MyIntents.ADD_BATCH_ACTION); intent.putExtra(MyIntents.BATCH_ACTION_NAME, "Make a coffee"); startService(intent); intent = new Intent(MyIntents.ADD_BATCH_ACTION); intent.putExtra(MyIntents.BATCH_ACTION

Overriding Search Long Press

谁说我不能喝 提交于 2019-12-25 08:15:34
问题 On many Android phones, when a user long presses the Search button, it launches the Google Voice Search intent. How can override this feature across the entire system, not just overriding Search button long presses from an activity? More specifically, how can I add my app to be the same type of intent as Google Voice Search so that it shows up as a "Choose Application" option when the Search button is long pressed. Thanks a lot! 回答1: Try using "android.intent.action.SEARCH_LONG_PRESS" as your

How to store Image location (fetching from filepicker/Intent) in Sqlite

╄→尐↘猪︶ㄣ 提交于 2019-12-25 08:13:05
问题 I am new to Android Development. I am trying to store Image file location in Sqlite database. Image is received from Intent with any file manager or gallery. I want to store its real path into the database so i can retrieve it next time for any action. I don't want to use blob/dont want to store image in the database. I am not finding any better solutions. Please help. 回答1: You can store an image in database as bytearray or also store image URL as TEXT in sqlite dataBase 回答2: Try this Intent

Can I use two spinners to retrieve data from a javascript file that i have named dist.js

*爱你&永不变心* 提交于 2019-12-25 08:12:19
问题 What I want to achieve is to use to spinners to select from town and then to town and then to retrieve the distance and time of travel that i have defined in my dist.js file. It works great when i use html in webview. but I don't want to use webview. Therefore how can i get the two spinners to calculate this? Okay have tried but still nothing works. here is my code so far. Can you tell what i am doing wrong? import java.io.BufferedReader; import java.io.InputStream; import java.io

How do I pass data between activities when I press back button in Android? [duplicate]

为君一笑 提交于 2019-12-25 07:48:35
问题 This question already has answers here : How to pass data from 2nd activity to 1st activity when pressed back? - android (9 answers) Closed 4 years ago . I'm trying to send data between activities using: on Activity 2 Bundle bloc = new Bundle(); bloc.putString("DataLoc", et1.getText().toString()); Intent intent = new Intent(this, Activity2.class); intent.putExtras(bloc); on Activity 1 Intent iinf = getIntent(); Bundle binf = iinf.getExtras(); if (binf != null) { String data = binf.getString(

Returning to Android app after external video player closes

左心房为你撑大大i 提交于 2019-12-25 07:45:05
问题 I start a video player from my Android app using the following code: Intent intent = new Intent (Intent.ACTION_VIEW); intent.setDataAndType (uri,"video/mp4"); intent.putExtra (MediaStore.EXTRA_FINISH_ON_COMPLETION, false); activity.startActivity (intent); This works fine except I do not get back to my app when the user finishes the player using the back button: when finishing the video player, I'm back on the launcher screen - which is not what the user expects. Any hints what can be done to