android-intent

Saving audio content Uri in sharedpreference to play later

雨燕双飞 提交于 2019-12-25 02:09:16
问题 I am trying to design an Alarm app where Audio is played when the device is shaken. I am selecting the Audio from file system using "ACTION_GET_CONTENT" in Intent with ActivityForResult . I am able to fetch the content uri , saving it in SharedPreference and playing it with MediaPlayer on a different Activity passing the URI in Intent . But, once I close my app and reopen it and try to play the Audio from the URI in SharedPrederence , the Audio is not played. What can be done so that I can

Trouble capturing activity result when firing Intent received from AccountManagerFuture

烂漫一生 提交于 2019-12-25 02:03:43
问题 I am trying to follow Authenticating to OAuth2 Services and implement the part where an Intent is included in the Bundle provided by the AccountManagerFuture#getResult() call. The issue is, that even though the docs say to use Activity#startActivityForResult(...), the Intent I am told to fire apparently starts in its own task, resulting in onActivityResult being called immediately. Another part which I am uncertain I am doing correctly is the way I launch this Intent. Because the code that

Twice opening activity with an null value

血红的双手。 提交于 2019-12-25 01:55:59
问题 i have an activity with some buttons in which when you click on any of buttons First with Intent send a value to another activity that contains a list view is filled with database. And I want to use this value as a parameter for where command select for filling list view with special Content now i have a problem that when run program and when click on a button, first open a empty list view and after clicking back-button, list view is correctly displayed data. Where is my mistake? source

Receive post data from a 3rd party within a webview

假装没事ソ 提交于 2019-12-25 01:48:39
问题 Stuck on an issue with http post data. So we've created a webview to work in. Then called a third party webservice this ask's to provide a postback url and some parameters, the webservice then processes the paramaters and redirects the user (our app) to the postback url we provided, with some data as a http post. We want to get the post data from this postback url but within the webview or within our app. Tried intercepting the url load with this code: final WebView webview = new WebView(this

I need to design this “red” percentage circle dynamically

十年热恋 提交于 2019-12-25 01:47:15
问题 How do i create this design in Android App. Please help me..I need to design this "red" percentage circle dynamically. 回答1: You need to have two progress bars one above the other, one with background color and one with red. Get them from xml in drawable and give them to the android:progressDrawable circle_progress_background.xml in drawable folder is as follows <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="

how to use intents in recyclerview items of navigation drawer to open a new activity fragment?

寵の児 提交于 2019-12-25 01:46:30
问题 My activity class is like following: /*ToolBar SetUp*/ app_toolBar = (Toolbar) findViewById(R.id.toolbar_header); setSupportActionBar(app_toolBar); getSupportActionBar().setDisplayShowTitleEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setHomeButtonEnabled(true); String TITLES[] = {"Home", "Search", "HalalRewards", "Contact Us", "User Guide", "F.A.Q", "Settings", "Share"}; int ICONS[] = {R.drawable.ic_action_home, R.drawable.ic_search, R.drawable

how to retrieve Data from Intent ?? [duplicate]

 ̄綄美尐妖づ 提交于 2019-12-25 01:38:02
问题 This question already has answers here : How do I get extra data from intent on Android? (17 answers) Closed 5 years ago . I just want to show an simple Employee record on next layoutPage/Activity !! this is my EmpLogin Java File public class EmpLogin extends Activity { private Button show; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.test); // TODO Auto-generated

Is it possible to show a chart by using MpAndroid from web server api?

☆樱花仙子☆ 提交于 2019-12-25 01:33:41
问题 I am newbie android developer and i have a list of different currency items and I should open a new screen with chart of clicked item. when user clicks on a list item a new screen should be opened which shows the exchange rate chart of the selected currency for the last 7 days based on USD. I should request every time the currency data gets updated for the last 7 days. Example request for getting currency history in a given period between USD and CAD: https://api.exchangeratesapi.io/history

Force android to pick an app for email sending

放肆的年华 提交于 2019-12-25 01:33:06
问题 I implemented sending emails from my application. I used this quesion on SO as a guide to achieve this, note that in the answers someone said to use setType("message/rfc822"); because it filters out all other email client that listen to the ACTION_SEND intent. My problem is that my galaxy tab 10.1 still has two application that listen to the intent, so a popup still opens asking me what email client I want to use. (The gMail app or the default eMail app). I can't uninstall one so the list won

Setting image view absolute position

元气小坏坏 提交于 2019-12-25 01:01:54
问题 I'm trying to manually set the image-view position within my app, the code is currently working but all the facebook images display at the top right and side on top of each other. I do not have access to any adaptors, this is within the Facebook SDK, can anyone spot any problems with the following code: My XML: DisplayPhotos.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/DisplayPhotosLayout" android:layout