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 7941841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:47:19+00:00 2026-06-03T23:47:19+00:00

In my app I am creating a broadcast receiver which will listen for network

  • 0

In my app I am creating a broadcast receiver which will listen for network changes. In the OnReceive it will check whether the device has just connected to WiFi and then start uploading in the background. No Activities will be shown so what do I need to do to initialize the framework without a splash Activity? I won’t need any of the page navigation parts of the framework so a stripped down initialization would be optimal.

    private override void OnReceive(Context context, Intent intent)
    {
        bool isWifiConnected = false;
        bool isMobileConnected = false;

        if (intent.Action.Equals(ConnectivityManager.ConnectivityAction))
        {
            NetworkInfo networkInfo = (NetworkInfo)intent.GetParcelableExtra(ConnectivityManager.ExtraNetworkInfo);


            if (networkInfo.IsConnected)
            {
                if (networkInfo.Type == (int)ConnectivityType.Wifi)
                {
                    isWifiConnected = true;
                }
                if (networkInfo.Type == (int)ConnectivityType.Mobile)
                {
                    isMobileConnected = true;
                }
            }
        }

        if (isWifiConnected)
        {
            StartUp(); //What do I put in this private method?
        }
  • 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-06-03T23:47:20+00:00Added an answer on June 3, 2026 at 11:47 pm

    I have now pushed some changes to GitHub which should hopefully enable you to create your app with its BroadcastReceiver.

    Using these modifications, you can now initialize the core application from any Application Component – Activity, BroadcastReceiver, Service or ContentProvider – using code like:

    var setup = MvxAndroidSetupSingleton.GetOrCreateSetup(this.ApplicationContext);
    setup.EnsureInitialized(this.GetType());
    

    These changes should enable an MvvmCross application to be started in “the Intent.ActionMain” scenario, as well as in the situations:

    • when a secondary Intent within the application manifest is requests
    • when a Service, BroadcastReceiver or ContentProvider component is requested
    • when a restart is requested because the Android OS has previously purged the app out of memory, but the user has now requested the app back in (a bit like hydration after tombstoning in WP7)

    A more lengthy explanation of these changes is http://slodge.blogspot.co.uk/2012/05/android-application-initialization-and.html

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

Sidebar

Related Questions

I am creating just a simple android app which will respond to received. I
I am creating an app which will have a question in a UILabel and
I am creating an app which has around 15 different animations. Some animations are
A single Rails command can make lots of changes in an app - creating
I have a JavaScript widget which communicates with my Rails app by creating tags
I'm creating and app that will rely on a database, and I have all
I am creating an app that is having a UIWebView which contains an advert.
Im creating an app in which i do a task when i receive a
I'm creating app which uses very large amount of memory. When I finish computation
i am creating app which would download and save files, than user could use

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.