locked
Sideload android apk from Xamarin Forms? RRS feed

  • Question

  • User166573 posted

    I'm looking to create a Xamarin Forms app that can launch other apps. If the app to be launched is not installed, is it possible to download it and install it programmatically? All downloads would be available on a local server, not through Google play store.

    Wednesday, June 21, 2017 5:21 PM

Answers

  • User180523 posted

    Is it possible? Yes. Our company is doing it for a closed app, not public release, on company owned hardware. Can I share the code for doing it? No. Non-Disclosure Agreement.

    But I can tell you it's possible.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, June 21, 2017 5:43 PM
  • User180523 posted

    You're biting off a lot of new material for a first project. Have you considered enrolling in Xamarin University and learning first, then trying to develop an app from scratch after a month or so of learning the foundation concepts?

    DependencyService https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/dependency-service/

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, June 21, 2017 6:42 PM

All replies

  • User180523 posted

    Is it possible? Yes. Our company is doing it for a closed app, not public release, on company owned hardware. Can I share the code for doing it? No. Non-Disclosure Agreement.

    But I can tell you it's possible.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, June 21, 2017 5:43 PM
  • User166573 posted

    Awesome. Can you give any guidance on where to start? I'm guessing I need to create a custom renderer of some kind to get into the Android code... Then something like this: https://forums.xamarin.com/discussion/comment/44195#Comment_44195 ?

    Wednesday, June 21, 2017 6:13 PM
  • User180523 posted

    Renderer? I don't think you're rendering anything in order to load an app. You might need a DependencyService so you get one implementation for Android and one for iOS and one for UWP.

    You could research how to make an Android launcher - after all in order to be a launcher you have to be able to get all the currently installed applications, and launch them. That's the first hurdle you described.

    Wednesday, June 21, 2017 6:21 PM
  • User166573 posted

    Sorry if that wasn't clear. Yes, that is the first hurdle. What confuses me is that I assume I'll need to use native Android code to install an apk, but I'm not clear on where that code lives.

    I'm a total Xamarin noob - and mainly working in Xamarin Forms, my only exposure to Android code is through the custom renderers.

    Wednesday, June 21, 2017 6:31 PM
  • User180523 posted

    You're biting off a lot of new material for a first project. Have you considered enrolling in Xamarin University and learning first, then trying to develop an app from scratch after a month or so of learning the foundation concepts?

    DependencyService https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/dependency-service/

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, June 21, 2017 6:42 PM
  • User166573 posted

    Ah, I had forgotten about Dependency Services! This is what I needed. Thank you! (sorry I hadn't read the first message properly where you mentioned it)

    Wednesday, June 21, 2017 7:26 PM