android-intent

SoundCloud Android explicit Intent sharing does not work anymore

可紊 提交于 2019-12-23 05:28:18
问题 Since the latest SoundCloud App update on Android, the explicit intent sharing (from other app) does not work anymore. Instead of showing the share page (which is normally called by the intent), it starts to record audio over the microphone, which is definitely wrong. I checked developers.soundcloud.com, there's neither a sign that explicit intent sharing is no longer support, nor anything else in that direction. So it looks more like a major bug in the latest SoundCloud update on Android.

get notified when requestSync function completed

 ̄綄美尐妖づ 提交于 2019-12-23 05:27:26
问题 im trying to start the calendar sync programatically using this code Bundle bundle = new Bundle(); bundle.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true); bundle.putBoolean(ContentResolver.SYNC_EXTRAS_FORCE, true); bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true); bundle.putBoolean(ContentResolver.SYNC_EXTRAS_IGNORE_SETTINGS, true); ContentResolver.requestSync(accounts[0], "com.android.calendar", bundle); i want a way so i can know when sync complete so i can read data from

Horizontally and Vertically center text for TextView in Android

情到浓时终转凉″ 提交于 2019-12-23 05:13:45
问题 How do I center the text horizontally and vertically for a TextView in Android? How do I center the alignment of a TextView? 回答1: In Linear Layouts use android:layout_gravity="center" In Relative Layouts android:layout_centerInParent="true" Above Code will center the textView in layout To center the text in TextView android:textAlignment="center" android:gravity="center" 回答2: add this property for textview in xml textview<android:height="yourheight" android:width="yourwidth" android:gravity=

What is the package name for “Task Manager” in Android to launch this activity?

我只是一个虾纸丫 提交于 2019-12-23 05:09:13
问题 I want to launch Task Manager using Intent from my application. What is the package name for the Task Manager? I.e., startActivity(new Intent("android.intent.action.<task_manager_package_name>")) 回答1: Use this snippet to get package name of task manager apps=getPackageManager().getInstalledPackages(PackageManager.GET_META_DATA|PackageManager.GET_PERMISSIONS|PackageManager.GET_PROVIDERS); // gets all app details on phone String packagename = new String(); for(int index=0;index<apps.size()

Using Shared preferences to send data to another activity

白昼怎懂夜的黑 提交于 2019-12-23 05:09:00
问题 What Have i done :: As you can clearly see i am sending data from BLD_IndividualListOfItems_Starters to ResultActivity using intents... looks like its a collection What i want to achieve :: I want to achieve same output using shared preferences ....that means in BLD_IndividualListOfItems_Starters i want to add the data & in ResultActivity i want to retrieve it using shared preferences What changes in code should i need to make BLD_IndividualListOfItems_Starters.java public class BLD

android browse files code

。_饼干妹妹 提交于 2019-12-23 04:58:13
问题 In the following code i am trying to implement the follwwing browser code http://www.remwebdevelopment.com/dev/a34/Directory-Browser-Application.html I am just getting a blank text view here as the ouptut and i do not see the browser.What am i doing wrong here public class File_browse extends Activity { private List<String> items = null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_file_browse); getFiles(new

Android notification refresh activity

倖福魔咒の 提交于 2019-12-23 04:56:34
问题 I have an IntentService starts at 9:00 and repeats every hour. It works with an AsyncTask that creates a BUNDLE. The IntentService have to show an Actvity in a Dialog (like Viber for messages), that shows a portion of datas in this BUNDLE and it have to create a notification that shows the same portion of datas. If the user clicks on the notification, it will start a second activity that shows all datas from BUNDLE. The problem is: the IntentService do his job, shows the activity and creates

Intent filterEquals and filterHashCode are no longer invoked when creating pending intents

给你一囗甜甜゛ 提交于 2019-12-23 04:56:08
问题 I create several notifications with similar pending intents but different values within. When clicking on any of the notifications, only the last registered intent is fired. It used to work in the past because the filterEquals() and filterHashCode() were invoked and this made the uniqueness possible. Now, when I put breakpoints in these methods, they aren't invoked anymore. Ideas on what happened? Thanks. 来源: https://stackoverflow.com/questions/13553911/intent-filterequals-and-filterhashcode

Android get Phone Dialer app package instead of Contacts

坚强是说给别人听的谎言 提交于 2019-12-23 04:47:23
问题 I'm working on an android app where I get list of installed apps using this code: Intent mainIntent = new Intent(Intent.ACTION_MAIN, null); mainIntent.addCategory(Intent.CATEGORY_LAUNCHER); List<ResolveInfo> allAppsInstalled = pm.queryIntentActivities(mainIntent, 0); then I assign each app icon, label and packagename to a recyclerview element where I can launch each package using the appropriate intent Intent launchIntent = pm.getLaunchIntentForPackage(packageName); context.startActivity

No Activity found to handle MediaStore.ACTION_IMAGE_CAPTURE Intent

人走茶凉 提交于 2019-12-23 04:46:13
问题 I am using this quite simple piece of code to capture an image on an Android device. File tmpFile = ...; Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(tmpFile)); startActivityForResult(intent, CAPTURE_IMAGE); This works fine for thousands of users except for one running this on a Kindle device without camera. Today I got a crash report from a device with camera: ANDROID_VERSION=4.2.1 BRAND=Hisense PHONE_MODEL=M470BSA STACK