android


How to know which activity has invoked current activity?


I have 3 activities, say A, B and C. How can I identify that Activity C is called from Activity A or activity B.
Put an extra on the Intent that indicates where it originated from.
Send extras to intent stating which activity has launched it.
Intent intent = new Intent(A.this, C.class);
intent.putExtra("FROMACTIVITY", "A");
startActivity(intent);
or
Intent intent = new Intent(B.this, C.class);
intent.putExtra("FROMACTIVITY", "B");
startActivity(intent);
And in Activity C check the value
Intent intent = getIntent();
intent.getStringExtra("FROMACTIVITY");

Related Links

RxJava chain to a database and a server
Chrisjenx's Calligraphy library doesn't work
Navigation Drawer Icon Color
Twitter Highlights on android
Saving and retrieving data from sugar db without duplication
Populating ListView with data from mySQL database
Android - Dynamically changing background color of a layout
onCharacteristicChanged() not getting called for notification in BLE GATT connection
“href” value in HTML to open video in youtube app or market (Google Play) on Android
How to define gradle build flavor for phone only by excluding tablet resources?
Firebase querying data
How do I get the linearlayout to take up the whole space of the scrollview?
Broadcast Receiver MY_PACKAGE_REPLACED never called
How to change DialogFragment size
width and height are wrong in AppCompatActivity
Android Layout match_width

Categories

HOME
android
django
google-cloud-platform
turing-machines
phpmyadmin
yahoo-finance
oracle-apex-5
socket.io
tvos
mvc5
heap
mautic
jsonpath
openbugs
pybossa
azure-iot-hub
dimensional-modeling
google-content-api
ag
ios10.2
php-mysqlidb
android-sharedpreferences
sinch
exchangewebservices
nsurl
magento-1.8
corenlp-server
eviews
cognos-bi
quickfixj
fstream
memory-address
mailkit
linkedhashmap
android-gridview
installshield-le
getpixel
nohup
tasm
odoo-website
bindingnavigator
dapper-simplecrud
plan-9
jide
mesosphere
openresty
spring-data-couchbase
seq
pybrain
offline.js
polyline
redbeard-ios
myspace
wso2developerstudio
hclust
installshield-2010
aspen
toast
maybe
sciruby
r-package
rate-limiting
sapscript
ember-cli-rails
amiga
sql-server-data-tools
mirror
nutiteq
snackbar
bufferedinputstream
kubuntu
rrule
cocos3d
rickshaw
raygun
with-statement
renderer
high-resolution
light
solace-mq
http-patch
jammer
cmmi
abstract-data-type
faye
urlrewriter
cuteeditor
squishit
blender-2.49
cfwindow
web-application-project
dsl-tools
change-management

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App