Android Question Reload webview with service

ArminKH

Well-Known Member
Hi every one
I have a web view in my activity and by that i logon to a site
But that site is safe and logout every users if be idle for 2minute
I want reload that site with service every 2minute but i dont want start my activity or use callsub method
Is there any way?because service not support activity objects
Tnx for your response
 

Iran-B4A

New Member
I know i dont want show any UI
I want just reload a site in background and dont signout(kicked) by site

You can Stop idle System With Type Text By GetElementsByID ( In Timer Tick With Intervall 80000 )
~~~~~~~~~~~~~
Aziz To Mitooni Az Tarighe GetElements Ba Type Kardan Tooye Yeki Az TextBox Haye Un Forum
JoloGiri Koni Az Idle Shodanet. Injooori Niazi Be Reloade Site Ham Nadari.
Faghat 1 Timer Niaz Dari Ke Masalan Text Haye Rnd Ro Tooye Yeki Az TextBox Ha Type Kone Ya Rooye Yek Gozineye Khas Click Kone ! ;)
 
Upvote 0

ArminKH

Well-Known Member
Is this a foreground service?
I dont know what u say erel.services are always in background this is not right?
I dont want any ui i want just reload a webview in other activity or in service but i dont want to load an activity and show any ui to user
 
Upvote 0

ArminKH

Well-Known Member
You can Stop idle System With Type Text By GetElementsByID ( In Timer Tick With Intervall 80000 )
~~~~~~~~~~~~~
Aziz To Mitooni Az Tarighe GetElements Ba Type Kardan Tooye Yeki Az TextBox Haye Un Forum
JoloGiri Koni Az Idle Shodanet. Injooori Niazi Be Reloade Site Ham Nadari.
Faghat 1 Timer Niaz Dari Ke Masalan Text Haye Rnd Ro Tooye Yeki Az TextBox Ha Type Kone Ya Rooye Yek Gozineye Khas Click Kone ! ;)


I know that but i need do this in background and dont kicked user however user closed be true
--------------------
Midoonam ino ama vaghti karbar barname ro bebande chi?mikham service ejaze nade hata age karbar barnamaro bast idsh az site kharej beshe
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
but the webview is in one of your own activitys, yes?

Then you can, from the service, use a callsubdelayed to start an sub in your activity with the webview... in this sub you call a webviews reload.
 
Upvote 0

ArminKH

Well-Known Member
but the webview is in one of your own activitys, yes?

Then you can, from the service, use a callsubdelayed to start an sub in your activity with the webview... in this sub you call a webviews reload.

By using callsub activity not load?i dont want show any thing and want reload be in background
I read in forum when activity is paused we cant use callsub is this wrong?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
By using callsub activity not load?i dont want show any thing and want reload be in background
I read in forum when activity is paused we cant use callsub is this wrong?

BUT where is the webview you want to reload???? In your OWN activity or not?
 
Upvote 0

ArminKH

Well-Known Member
See
I have a web view in one activity
By this web view i can login to a site
But when user is iddle the site decide to kick user out and this is not good for me
And now this is not matter for me to use other web view or not in service or activity
I just want to dont kick out and not show any ui or any activity
I dont know is there any way to use callsub in paused activity or use service to create other web view to reload or reload a web view on other activity
Plz help
 
Upvote 0

ArminKH

Well-Known Member
I need this because that site use captcha code to login again and i have not any way to guess the code true
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
See
I have a web view in one activity

That´s what i said with

Then you can, from the service, use a callsubdelayed to start an sub in your activity with the webview... in this sub you call a webviews reload.

so the webview-activity stays open (cause it already was open)
 
Upvote 0

ArminKH

Well-Known Member
Excuse me for my english but i dont exactly understand
You say:can i use callsub when my activity is paused?if yes this can be in background?i dont want appare any ui because this should reload every 2minute
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Excuse me for my english but i dont exactly understand
You say:can i use callsub when my activity is paused?if yes this can be in background?i dont want appare any ui because this should reload every 2minute

When your activity is paused then you cannot do a reload. It is paused.
 
Upvote 0

ArminKH

Well-Known Member
at 2 month ago i use a webview in service but not in process_global
I use that in service create,but i just dim a web view in service create and initialize and load a site and then use webview_finished sub
In webview_finished sub i put a log and that work but i dont know my website loaded or not but web view finished sub worked
 
Upvote 0
Top