All Questions
11
questions
1
vote
1
answer
111
views
When building an Android library, what pattern can I use to support a configured callback in an Activity
I am building an Android library for our platform and I'm struggling with how to allow my users to pass a function that gets called at certain times in the library.
The library starts an Activity, ...
0
votes
0
answers
164
views
Instance in companion object
I can't get on with access on the
var mBleWrapper: BleWrapper? = null
in other activities. There is a predefined Java interface called BleWrapperUiCallbacks, which I suspect contains the ...
3
votes
0
answers
109
views
Android "Sticky" interface callbacks
This question is more an architectural question more than an actual implementation.
In very basic terms I have network calls made to web services in and android app. When the network call is complete,...
0
votes
1
answer
854
views
How to extend Activity in a Java class already extended [duplicate]
I'm developing an AR Android App using Metaio. I need to show some data when a real object has been tracked. To do this I register a callback, this is the best way that I have found.
Unfortunately to ...
0
votes
2
answers
141
views
Return a string from an anonymous class
I have an android project in which I use a class to send http requests using the Volley library.
It is called WebServicesAdapter. I used a callback in it to return a value to the called activity but ...
0
votes
4
answers
5k
views
starting activity from a callback method
i use a class WebServiceAdapter using volley library for implementing http connections. since i can't find a way to return a string to activity
i use an interface to callnback into MainActivity. ...
1
vote
1
answer
944
views
OnActivityResult not call inside fragment but the Main Activity in android
I am working on a fragment that call camera.
startActivityForResult(intent, REQUEST_CAMERA);
The problem is , if I overwrite the onActivityResult inside the fragment, it does not call,
@Override
...
1
vote
0
answers
174
views
Android refreshing a previous activity after change filters on preference screen
How can I refresh my previous activity when I press the back button, I have a FilterActivity, and when I press the back button I want to refresh it and show only the filtered items, What I tried so ...
5
votes
1
answer
6k
views
Android: How do you pass a callback to an activity?
I am creating a library. It creates an activity, starts it, and finishes it after a button is pressed.
After the button is pressed, I'd like to execute some client code through an interface.
That is,...
1
vote
3
answers
874
views
Notifying view/activity when the data/model changes
I have an Activity A, Activity B and an Object C. I need to start Activity B from Activity A and while starting i need object C to find user location and once it is available Activity B must be ...
3
votes
1
answer
3k
views
Android - do something in activity when preferences change
I have two classes, CustomerPreferences which extends PreferenceActivity implements OnSharedPreferenceChangeListener and CustomerActivity which extends Activity. In CustomerActivity, I calculate some ...