does anyone know how to acces an android background process from an other activity as its own? - android-activity

does anyone know how to acces an android background process from an other activity as its own?
for example i have an network connection on my MainActivity but want to send data via that from an other activity.
how to handle that.
Thanks in ahead.
Dyon

Related

B4A How to popup a message box on top of non-related apps

I need to run a service that notifies an android phone user with a button/messagebox that there is a message waiting for them in a background app. I have a scheduler program that does this very thing. Can someone help me with the code or point out some code that will do this?
Thanks

ios check internet connection background process

I am building an ios application that requires internet connection via wi-fi in order to talk to web service. Now before anything, i want my application to run a background process that checks internet availability and when connected talk to web service.
Any body knows how to implement this in background process?
I already use this solution to check whether there is an internet connection or not
Easiest way to detect Internet connection on iOS?
but I want to know how to run this process in the background in order to work even the application is closed.
You can have your checks done when in foreground. Its not allowed to for an app to execute code in background continuously(although you can execute some code when you go to background initially). If you are not planning to publish this app in app store and its a enterprise solution, then you should explore ways to stay in background by running a music file (without sound) to get CPU Cycles. It worked for me..

Voip app using background task

Now I am developing a voip app.
Is it okay to use background task to keep my app alive? so app can received incoming state to pop up a notification from the background.
I try CFStreamCreatePairWithSocket, but still can't get info from nsstream event callback.
If I use background task, App can get incoming state as it does in the front.
Thanks a lot.
Please always make sure to provide all required information to get quick help. e.g. Provide some code snippet if possible, provide information regarding which version of OS you are using etc.
Check following answer: It may help you. How to Maintain VOIP socket connection in background?

iPhone data transmission issue

I have an iPhone app that uses ASIHTTPRequest to transmit data input by the user to a remote MySQL database via a PHP webservice layer. This works perfectly.
If the user presses the submit button the data should be sent regardless...the problem arises when there is insufficient bandwidth...rather than displaying some uialert to inform the user, I would like to implement some kind of function that constantly 'sniffs' for an internet connection even when the app isn't running (in main view) that ensures that the user only has to press 'submit' once.
How is this possible? Has anyone come across any tutorials/examples of anything similar?
Check out this example application from Apple: Reachability
It'll help you with some code to detect when the connection has changed.
Here's a link about backgrounding tasks. As you'll read, you can request additional time to complete a task, but it won't wait an infinite amount of time until it's complete. Background Tasks
Use the Reachability API in conjunction with a flag of some sort that will perform the desired action once it detects that a connection is available.

File Downloadin in android with service?

When i downloadin a file from Web in android, then i want to show progress bar in notification area of status bar through service, but i can not able to do this. how can i do it. I am not able to pass the file length in service. Please help me.
thanks in advace
Check the AsyncTask. This can help you implement your UI thread without having problem with background threads. http://developer.android.com/reference/android/os/AsyncTask.html