android-intent

Setting ID to google map API v2 marker to return image taken by camera intent

冷暖自知 提交于 2019-12-30 12:36:21
问题 Okay, This problem i have been facing for a couple of days now and can't seem to resolve. This is how my map works: Tap on any point on map Take photo by camera intent return photo as marker (thumbnail) to that specific point tapped. (all the above works fine) This is where i am stuck: Tapping on the marker (image) it should then display larger image of marker as the marker thumbnail is quite small. The problem is it shows the latest image taken and not the image related to that marker. So my

Start Activity clearing top in Android

廉价感情. 提交于 2019-12-30 12:36:15
问题 I have the following Activities in my stack: A , B , C, D I want to relaunch B in order to get this stack: A , B' Where B' is a new B instance (not the old receiving a onNewIntent callback, how can I do it? By the way I'm using a intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); when launching the B activity but this way the onNewIntent is called instead of start a new instance 回答1: Use android:noHistory=true in manifest file for particular activity to clear.Hope this might solve your issue.

Activity doesn't show in full screen

微笑、不失礼 提交于 2019-12-30 12:14:08
问题 I defined a new Activity on my project and I have some trouble with fullScreen. I defined in the manifest file like this: <activity android:name=".Test" android:launchMode="singleInstance" android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" ............. > If I start the activity from another activity, I got the desired full screen. The problem is when I start this activity from a BroadcastReceiver - I need to open this activity inside a

Android: Does context affect filterEquals(), used to cancel alarm?

落爺英雄遲暮 提交于 2019-12-30 11:48:27
问题 To cancel an alarm, I use alarmManager.cancel(pendingIntent); which, according to android developers Removes any alarms with a matching Intent. Any alarm, of any type, whose Intent matches this one (as defined by filterEquals(Intent)), will be canceled. If it compares 2 pendingIntents which are constructed with a different context and the intents they use have a different context as well, but the classes they refer to are the same, does filterEquals(Intent) return true? So, pendingIntent1 has

Not able to launch Gallery from Android Instant app

[亡魂溺海] 提交于 2019-12-30 11:17:27
问题 I created an app which picks up images from images folder in emulator and displays selected image in my layout of application. When I converted my app to instant app, the same code that picks up images from image folder throws exception. I used runtime permissions READ_EXTERNAL_STORAGE. My code: private static final int PICK_IMAGE_REQUEST = 234; Intent intent = new Intent(); intent.setType("*/*"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(intent, PICK_IMAGE_REQUEST);

Warning(Window already focused, ignoring focus gain).Starting Facebook App from external Activity

烂漫一生 提交于 2019-12-30 11:09:32
问题 Starting External FaceBook activity to share data causes a warning WARN/InputManagerService(52): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@438edb68 and the FB activity is not seen on Foreground. The Code i used is Intent sendShareIntent = new Intent("com.facebook.katana"); sendShareIntent.setComponent(new ComponentName("com.facebook.katana", "com.facebook.katana.ShareLinkActivity")); startActivity(sendShareIntent); My emulator has

BroadcastReceiver not receiving intent

左心房为你撑大大i 提交于 2019-12-30 11:05:40
问题 So now I have my BroastcastReceiver declared in the manifest file... <receiver android:name=".MyReceiver"> <intent-filter> <action android:name="android.intent.action.CALL_BUTTON" /> </intent-filter> </receiver> I want to catch the intent when the Call button is pressed. Here is my code... public class MyReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Toast.makeText(context, "intent received", Toast.LENGTH_LONG); if(intent.getAction()

ActionBar share item produces “Android System” thingy

最后都变了- 提交于 2019-12-30 10:44:07
问题 I want a share icon in the action bar, upon pressing, a chooser shows up. I have most of this in place, but this unwelcome middle-man steps in... The menu: <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/menu_share" android:title="@string/share" android:showAsAction="always" android:actionProviderClass="com.actionbarsherlock.widget.ShareActionProvider" /> </menu> The SherlockFragment's onCreateOptionsMenu:

Send email through Intent : SecurityException

旧时模样 提交于 2019-12-30 10:13:50
问题 Here is how I'm sending email through Gmail App. Intent emailIntent = new Intent(Intent.ACTION_SEND); emailIntent.setClassName("com.google.android.gm", "com.google.android.gm.ComposeActivityGmail"); emailIntent.setType("text/html"); emailIntent.putExtra(Intent.EXTRA_SUBJECT, "Puzzle"); emailIntent.putExtra(Intent.EXTRA_TEXT, someTextHere)); emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(attachmentFile)); try { startActivityForResult(emailIntent, SHARE_PUZZLE_REQUEST_CODE); } catch

GSC Message: Fix deep links for Android app. Error “Intent URI not supported”

ⅰ亾dé卋堺 提交于 2019-12-30 09:57:07
问题 [Continued from https://productforums.google.com/forum/#!topic/webmasters/wZEY_QZicxg;context-place=forum/webmasters] Google Search Console Message: This week we received a GSC Message stating that the deep links are not correctly configured. IMG1 IMG2 This is the first message of its kind since December 2014 when we implemented the App Index mechanism. Our setup of the App Index has not changed since then (except that we added a few pages, we are now at 20 pages - it grows by design with 3