startactivityforresult

How to return SeekBar value to previous activity?

瘦欲@ 提交于 2020-01-05 15:45:54
问题 How to return seekBar value from Activity B to Activity A ? seekBar=(SeekBar)findViewById(R.id.seekBarPercentage); save.setOnClickListener(new View.OnClickListener() //return to previous activity { @Override public void onClick(View v) { Intent returnIntent=new Intent(); Project=project.getSelectedItem().toString(); //spinner value Description=description.getText().toString(); //editText value // seekBar value ? returnIntent.putExtra("Project",Project); returnIntent.putExtra("Description"

How to return SeekBar value to previous activity?

家住魔仙堡 提交于 2020-01-05 15:45:10
问题 How to return seekBar value from Activity B to Activity A ? seekBar=(SeekBar)findViewById(R.id.seekBarPercentage); save.setOnClickListener(new View.OnClickListener() //return to previous activity { @Override public void onClick(View v) { Intent returnIntent=new Intent(); Project=project.getSelectedItem().toString(); //spinner value Description=description.getText().toString(); //editText value // seekBar value ? returnIntent.putExtra("Project",Project); returnIntent.putExtra("Description"

How to get data onActivityResult from external App Activity using seResult or startActivityForResult

放肆的年华 提交于 2020-01-04 07:01:29
问题 I have two application separately.Client and Seller App. I want to pay money for client app and get response to seller app. Anyway,i have deep linking concept enabled in seller app. Client App : It has three Activity Page inside client app.getting details(first activity page) and show confirmation(second activity) and payment is third Activity. Note:Open Client App using Seller App, fill all details and payment from client app and send response to Seller App. for this client side i have set

Android Activity 调用startActivityForResult之后被销毁?

青春壹個敷衍的年華 提交于 2019-12-22 17:43:11
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Android Activity 调用startActivityForResult之后调用的Activity被销毁的问题 最近在华为的手机上面发现Activity调用 startActivityForResult后返回结果时,调用的Activity都会被重新创建,也就是Activity被销毁了。 在网上经过一番查找,发现有哥们说在手机开发人员选项里面有这么一项“不保留活动”被勾上了, 一看还真是。 把那个勾去掉一切又恢复正常了。 来源: oschina 链接: https://my.oschina.net/u/72663/blog/322772

startActivityForResult returns to the wrong activity

旧街凉风 提交于 2019-12-13 15:31:16
问题 I am working on an app which uses a custom camera (with Surfaceview and such), I am using startActivityForResult from my ObjectActivity to go to the activity with the camera named CameraActivity. This happens in this method. public void addPicture(View v) { final CharSequence[] items = { "Take Photo", "Choose from Gallery", "Cancel" }; AlertDialog.Builder builder = new AlertDialog.Builder(ObjectActivity.this); builder.setTitle("Add Photo!"); builder.setItems(items, new DialogInterface

Android. Open the device's Contact list with an Intent not working. Unable to instantiate activity ComponentInfo

点点圈 提交于 2019-12-13 01:43:30
问题 This is an experiment for understanding what ContactsContract can offer. I don't know what I've done wrong... Please help me with this problem. My code: package com.example.beni.contactbrowser1; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.provider.ContactsContract; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.View; import android.view.Menu; import android.view.MenuItem; import

StartActivity for Result for external App not working

天涯浪子 提交于 2019-12-12 04:16:54
问题 I am preparing 2 Apps name it App-1 & App-2, using App-1 I call MainActivity of App-2 from StartActivityForResult(). Till this it works fine, I am able to call App-2 MainActivity. Now for calculations App-2 internally calls SecondActivity of App-2. So at this point app starts breaking. Without waiting for internal response from SecondActivity, MainActivity responds with resultCode=0 and null in data to our App-1 implicitly (I haven't even called setResult()). And I cannot directly respond

If I start activity for result from a fragment, should I call on activity result in the fragment or activity?

天涯浪子 提交于 2019-12-11 14:03:40
问题 I am not sure what would be the correct way. I have a few calls for action for result in different fragments. Should each fragment have its own onActivityResult? Or should it all be handles in the activity's onActivityResult? 回答1: You must implement the onActityResult for every Fragment which started an activity via startActivityForResult . So, each fragment can track the result properly: The activity result makes sense only for the fragment which requested it. There's also a reason for it.

Crashes after startActivityForResult in API 27

别说谁变了你拦得住时间么 提交于 2019-12-11 10:27:57
问题 After updating to API 27 and Support library 27.0.2 suddenly I get a lot of these stack traces in Crashlytics: Fatal Exception: java.lang.IllegalArgumentException at android.os.Parcel.readException(Parcel.java:1544) at android.os.Parcel.readException(Parcel.java:1493) at android.app.ActivityManagerProxy.isTopOfTask(ActivityManagerNative.java:5108) at android.app.Activity.isTopOfTask(Activity.java:5688) at android.app.Activity.startActivityForResult(Activity.java:3973) at android.support.v4

Call JavaFX in Java program and wait for wait to exit before running more code

橙三吉。 提交于 2019-12-11 09:49:30
问题 In my java program i give some options to the user and one of thems calls a JavaFXProgram to display something. I only want to run more code in the Java program when this JavaFX that got called actually exits, it may take 5 seconds, it may take a minute. Ideally what i would like is something like we have in Android. We call startActivityForResult() and then wait for the call of onActivityResult() . How can i achieve similar behaviour in my situation? I have this code that i wrote to try to