# Can anyone please tell me how to perform auto refresh on android app using appium

**URL:** <https://discuss.appium.io/t/can-anyone-please-tell-me-how-to-perform-auto-refresh-on-android-app-using-appium/9506>\
**Category:** Support\
**Created:** [April 5, 2016, 10:29am UTC](https://discuss.appium.io/t/can-anyone-please-tell-me-how-to-perform-auto-refresh-on-android-app-using-appium/9506 "2016-04-05T10:29:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![srivastava.akash42](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/b38774/32.png) [@srivastava.akash42](https://discuss.appium.io/u/srivastava.akash42)\
**Post date:** [April 5, 2016, 10:29am UTC](https://discuss.appium.io/t/can-anyone-please-tell-me-how-to-perform-auto-refresh-on-android-app-using-appium/9506/1 "2016-04-05T10:29:26Z")

</div>

Hi Team

- Platform is Android
- Appium version : 1.5
- Emulator/Simulator or Real Device : Real Device
- Client langauage (language binding) : java
- OS : Windows

I have a scenario where i need to to perform an auto refresh by pulling up the app which is when the loader comes and updates the feeds.

1. Open app
2. Capture the photo
3. Post the image which has been captured
4. Goto the feed screen
5. Now on this screen i need to pull the app so that the auto refresh loader comes and updates the feeds with the new data.

If someone is able to do it can please reply me for the step 5

---

<div class="post-metadata">

**Author:** ![Aleksei](https://discuss.appium.io/user_avatar/discuss.appium.io/aleksei/32/6267_2.png) [@Aleksei](https://discuss.appium.io/u/Aleksei)\
**Post date:** [April 5, 2016, 12:04pm UTC](https://discuss.appium.io/t/can-anyone-please-tell-me-how-to-perform-auto-refresh-on-android-app-using-appium/9506/2 "2016-04-05T12:04:31Z")

</div>

according to your description app must itself refresh feeds.

how you imaging we can force app to refresh screen?

if your app will refresh screen on resume try:

```auto
try{driver.runAppInBackground(1);} catch (Exception e) {}

```

---

<div class="post-metadata">

**Author:** ![srivastava.akash42](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/b38774/32.png) [@srivastava.akash42](https://discuss.appium.io/u/srivastava.akash42)\
**Post date:** [April 5, 2016, 12:09pm UTC](https://discuss.appium.io/t/can-anyone-please-tell-me-how-to-perform-auto-refresh-on-android-app-using-appium/9506/3 "2016-04-05T12:09:10Z")

</div>

> [@Aleksei](#):
>
> how you imaging we can force app to refresh screen?
> 
> if your app will refresh screen on resume tr

Actually once you have successfully posted the image then you need to go to feed screen and pull the screen from up to down so that you can get the latest feeds which you have posted.

---

<div class="post-metadata">

**Author:** ![Aleksei](https://discuss.appium.io/user_avatar/discuss.appium.io/aleksei/32/6267_2.png) [@Aleksei](https://discuss.appium.io/u/Aleksei)\
**Post date:** [April 5, 2016, 12:10pm UTC](https://discuss.appium.io/t/can-anyone-please-tell-me-how-to-perform-auto-refresh-on-android-app-using-appium/9506/4 "2016-04-05T12:10:16Z")

</div>

so do swipe from up do down

---

<div class="post-metadata">

**Author:** ![srivastava.akash42](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/b38774/32.png) [@srivastava.akash42](https://discuss.appium.io/u/srivastava.akash42)\
**Post date:** [April 5, 2016, 12:12pm UTC](https://discuss.appium.io/t/can-anyone-please-tell-me-how-to-perform-auto-refresh-on-android-app-using-appium/9506/5 "2016-04-05T12:12:11Z")

</div>

Ok Can you please give the swipe code how to implement it.  
I need to swipe from app starting so that loader will come and feed screen will get refreshed

---

<div class="post-metadata">

**Author:** ![Aleksei](https://discuss.appium.io/user_avatar/discuss.appium.io/aleksei/32/6267_2.png) [@Aleksei](https://discuss.appium.io/u/Aleksei)\
**Post date:** [April 5, 2016, 12:13pm UTC](https://discuss.appium.io/t/can-anyone-please-tell-me-how-to-perform-auto-refresh-on-android-app-using-appium/9506/6 "2016-04-05T12:13:22Z")

</div>

driver.swipe(startx, starty, endx, endy, duration)

---

<div class="post-metadata">

**Author:** ![srivastava.akash42](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/b38774/32.png) [@srivastava.akash42](https://discuss.appium.io/u/srivastava.akash42)\
**Post date:** [April 5, 2016, 12:20pm UTC](https://discuss.appium.io/t/can-anyone-please-tell-me-how-to-perform-auto-refresh-on-android-app-using-appium/9506/7 "2016-04-05T12:20:43Z")

</div>

> [@Aleksei](#):
>
> driver.swipe(startx, starty, endx, endy, duration)

Hi Aleksei

thanks for your help i am attaching herein the screenshot of the app where I have highlighted the app from where we need to hold and swipe can you please tell what would be its co-ordinates just by giving me an example  
i have highlighted the co-ordinates in red color,

 ![](https://discuss.appium.io/uploads/default/original/2X/4/4495a13ccc70f3473193a1007b6b8eb09a203ccb.png)

---

<div class="post-metadata">

**Author:** ![Aleksei](https://discuss.appium.io/user_avatar/discuss.appium.io/aleksei/32/6267_2.png) [@Aleksei](https://discuss.appium.io/u/Aleksei)\
**Post date:** [April 5, 2016, 12:25pm UTC](https://discuss.appium.io/t/can-anyone-please-tell-me-how-to-perform-auto-refresh-on-android-app-using-appium/9506/8 "2016-04-05T12:25:03Z")

</div>

try: driver.swipe(1080/2, 322+5, 1080/2, 1192-5, 1000)

---

<div class="post-metadata">

**Author:** ![srivastava.akash42](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/b38774/32.png) [@srivastava.akash42](https://discuss.appium.io/u/srivastava.akash42)\
**Post date:** [April 5, 2016, 12:30pm UTC](https://discuss.appium.io/t/can-anyone-please-tell-me-how-to-perform-auto-refresh-on-android-app-using-appium/9506/9 "2016-04-05T12:30:12Z")

</div>

Thanks Aleksei it worked out, Thanks for the help

---

<div class="post-metadata">

**Author:** ![Rish\_Baranwal](https://discuss.appium.io/letter_avatar_proxy/v4/letter/r/a4c791/32.png) [@Rish\_Baranwal](https://discuss.appium.io/u/Rish_Baranwal)\
**Post date:** [July 26, 2018, 12:04pm UTC](https://discuss.appium.io/t/can-anyone-please-tell-me-how-to-perform-auto-refresh-on-android-app-using-appium/9506/10 "2018-07-26T12:04:13Z")

</div>

It’s not worked for me, I applied the above solution on Google Pixel, but it fails the problem I am facing is that when the android screen load completely after the service request complete we are not getting the element from the screen, for that reason we tried to refresh the screen, spent my complete day, but fails, pleas help.
