Category : android-intent

I have an activity which calls an intent once logged in. The Intent is first calling another activity and then calling the correct one after. startActivity(new Intent(this, PlayWithFriend.class)); There is no reference is to the other activity. I have debugged it to this point. If I remove this line of code neither activities are called. ..

Read more

I’m developing a shortcut settings app that opens some settings (Wifi, Location and Bluetooth). I wish that when the user go back it’s to my application and not the settings app. To launch the correct setting page I do: val intent = Intent(Settings.ACTION_BLUETOOTH_SETTINGS) intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) startActivity(intent) On android 8 there is no issue because the top ..

Read more

I developed a deep link app. The intent data remains, when I close the app by the back button and restart from the task After launching from deep link. Manifest: <application <activity android:name=".MainActivity" android:label="@string/appName" android:launchMode="singleTask"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:host="news" android:scheme="example" /> </intent-filter> </activity> <activity android:name=".NextActivity" /> </application> ..

Read more

I am trying to insert the address fetched from the geocoderAPI, into my edittext field. After granting the location permission in my app, no text gets inserted in my edittext field, and even the SMS permission isn’t called too. My code: public class message extends AppCompatActivity { EditText edittext; Button send; FusedLocationProviderClient fusedLocationProviderClient; ArrayList<String> contacts=new ..

Read more

I want to perform a task when an app gets back from Settings.ACTION_WIRELESS_SETTINGS but after calling startActivityForResult on the button click from activity A, Activity A keeps getting destroyed after startActivityForResult is called and onCreate called again after coming back from wifi setting here is the sample code that I have implemented this is the ..

Read more

I am following uCrop’s readme on how to implement it inside an app. After retrieving an image from gallery, I am successfully launching the uCrop activity like this: private val uploadLauncher = registerForActivityResult(ActivityResultContracts.GetContent()) { uri -> uri?.let { launch { withContext(Dispatchers.IO) { UCrop.of(uri, Uri.fromFile(File(getActivity()?.getCacheDir(), "image.png"))).withAspectRatio(4.0F, 3.0F).start(requireActivity()) } } } } I’m launching the launcher when ..

Read more