android-intent

Android app not opening from URL using intent-filter

孤者浪人 提交于 2020-02-06 08:30:22
问题 I am trying to open my app from a website and read some text from link. The URL will be like codespike.com/?code=xxxx . I need to read the xxx but my problem is that I am not able to open my app when this specific URL in being opened in the browser. For testing I also used a webiste bfinstafollowers.com , not working with this either. This is what I am trying. <activity android:name="com.softech.betforinstafollowers.MainActivity" android:label="@string/app_name" android:screenOrientation=

What is the root activity in android?

独自空忆成欢 提交于 2020-02-05 05:14:05
问题 https://developer.android.com/guide/topics/manifest/activity-element.html android:alwaysRetainTaskState Whether or not the state of the task that the activity is in will always be maintained by the system — "true" if it will be, and "false" if the system is allowed to reset the task to its initial state in certain situations... This attribute is meaningful only for the root activity of a task ; it's ignored for all other activities. So what does root activity mean exactly? Does root activity

Hide installed app in android

Deadly 提交于 2020-02-03 00:37:26
问题 i want to hide the installed app by another app in android application, lets say user has installed 3rd party app called Skype, Watsapp, facebook etc... is there a way we can hide and show them upon click of a button from another app?. i tried below code. No luck, nothing happened to my launcher PackageManager packageManager = context.getPackageManager(); ComponentName componentName = new ComponentName(context, LauncherActivity.class); packageManager.setComponentEnabledSetting(componentName,

Sending SMS to multiple recepients (Samsung vs HTC)

梦想的初衷 提交于 2020-02-02 15:28:40
问题 I am using the following code in Samsung that works fine for me, Intent smsIntent = new Intent(Intent.ACTION_SENDTO,Uri.parse("smsto:123,456")); smsIntent.putExtra("sms_body", messageBody); startActivity(smsIntent); and the following that works fine in HTC Intent smsIntent = new Intent(Intent.ACTION_SENDTO,Uri.parse("smsto:123;456")); smsIntent.putExtra("sms_body", messageBody); startActivity(smsIntent); Difference is the use of "," and ";" as a delimiter in samsung and htc respectively. Is

Possibility for Fake NFC(Near Field Communication) Launch

荒凉一梦 提交于 2020-02-02 03:19:30
问题 I am working on Near Field Communication for reading data from NFC Tags. I don't have NFC supported Android Mobile and NFC Tags to test the Application i created . I want to know whether it is possible to Launch my App through intent filter (Should assume NFC tag is detected from my device) My Manifest Snippet : <activity android:name=".ServerActivity" android:label="@string/app_name" android:screenOrientation="portrait" > <intent-filter> <action android:name="android.nfc.action.NDEF

Capture image without permission with Android 6.0

情到浓时终转凉″ 提交于 2020-01-31 03:25:27
问题 I need to let the user take a picture (from the gallery or from a camera app) with Android 6.0. Because I don't need to control the camera, I wanted to use an intent as describe here: However, if you don't need such control, you can just use an ACTION_IMAGE_CAPTURE intent to request an image. When you start the intent, the user is prompted to choose a camera app (if there isn't already a default camera app), and that app takes the picture. The camera app returns the picture to your app's

Android - Showing Phonebook contacts and selecting one

三世轮回 提交于 2020-01-31 03:22:45
问题 I want to show the list of contacts in phonebook on a click of a button and then select one of the contacts from it and then retrieve its contact number? I dont want to make my custom list, is there a way to use androids built in functionality? 回答1: TRY THIS--> setContentView(R.layout.main); contactNumber = (TextView)findViewById(R.id.contactnumber); Button buttonPickContact = (Button)findViewById(R.id.pickcontact); buttonPickContact.setOnClickListener(new Button.OnClickListener(){ @Override

How to fix this ArrayAdapter requires the resource ID to be a TextView

半城伤御伤魂 提交于 2020-01-30 13:13:10
问题 I am new to android, I'm trying to develop an application with gridview and listview using json. Through json I displayed set of images in gridview and based on the position of the gridview, i am displaying the results in the next page which is listview. This is my Sub_Category.java (2nd page java file) package com.javatechig.gridviewexample; public class Sub_Categories extends ActionBarActivity { private ArrayList<GridItem> SubCatgyData; private static final String TAG = Sub_Categories.class

android: send & get String besides by using extra() method

爷,独闯天下 提交于 2020-01-30 06:58:27
问题 I just wonder what method can be use to send String from one to another activity besides by using intent.putExtra(), and getIntent.getExtra(). Cause my project getting unexpected result when using putExtra(), just want to another for send String. Any suggestion and examples? Thanks. 回答1: you can also send by following ways How do I pass data between Activities/Services within a single application? Non-Persistent Objects For sharing complex non-persistent user-defined objects for short

2 Intent Filters, 1 Activity - Which opened it?

穿精又带淫゛_ 提交于 2020-01-30 02:57:08
问题 Is there a way to know which Intent Filter is responsible for launching an Activity which has two Intent Filters defined in AndroidManifest.xml? I want a slightly different set of logic, but not enough that should require a whole new Activity. Thanks! 回答1: Never mind, found it. Just wasn't looking hard enough... Using this.getIntent().getAction() in your Activity will spit out exactly what I was looking for, a String to identify which Intent Filter Action opened it. 来源: https://stackoverflow