Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6922049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:21:23+00:00 2026-05-27T10:21:23+00:00

I have a service which polls every hour attempts to sync data automatically to

  • 0

I have a service which polls every hour attempts to sync data automatically to the web from the device.

I have it working but I need to find a way to establish an internet connection if there is not one available.

For example – If my phone is in standby mode (screen locked for a period of time) the internet connection is dropped and it is unable to sync when it needs to.

I would like to attempt to connect via wifi if available, then using 3G if required.
Is there a reliable way to do this?

UPDATE –
I found an article online which uses this code to attempt connection via 3G if there is no wifi available :

int resultInt = connectivityManager.startUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE, "enableHIPRI");

unfortunately it doesn’t seem to work on all devices, maybe I need to try other options than “enableHIPRI” ??

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:21:24+00:00Added an answer on May 27, 2026 at 10:21 am

    OK, although I haven’t been able to solve this problem I have discovered that the main cause for the delay in between sync attempts is because the cpu gets stopped during sleep mode, this means my timer task was paused..

    My workaround was to rewrite the service using a wakeful intent to get around the timer issue.

    This makes my solution much more reliable so I am closing this question! 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a rather simple web-service which exposes data from sql server. It will
I have a windows service which fetches data from various datasources and build a
I have a web service which has a generic function that returns a dataset
I have a C# service which is not an ASP.NET application, but uses a
I have two ASMX web services consumed from javascript. The first service performs a
I have a service which polls a queue very quickly to check for more
First, let me start with some background: I have a web service which accepts
I have a service which has one endpoint , I have defined this endpoint
I have a service which creates a number of child processes. Using c# I
I have a service which takes the user supplied rich text (can have HTML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.