After hours of research i was able to create a download link for my app on a windows server. here are the instructions for doing so.
under iis create a mime type by right clicking on your server name then click properties. select mime types button and add .apk with the mime type
application/vnd.android.package-archive
Next
create a download.aspx page or whatever you want to call it
add the following to your page
<html>
<asp:HyperLink ID="lnkdwnload" runat="server" NavigateUrl="~/myfile.apk">Download myfile</asp:HyperLink>
</html>
Next in web.config add the following under <system.webserver>
<staticContent>
<mimeMap fileExtension=".apk" mimeType="application/vnd.android.package-archive"/>
</staticContent>
Restart IIS and your users can now download your app
After More Research the user had to click the link then go to the downloads folder to install the application, if you want to use a pretty view, graphic or whatever use the url method above, else it is possible to use the method below after you have set your iis settings
<code>
Sub getNewVersion()
Dim DlApk as intent
Dim uri as string
'This will directly start the download of your file on the iis server
uri = "HTTP PATH TO YOUR APK FILE"
DlApk.Initialize(DlApk.ACTION_VIEW,uri)
StartActivity(DlApk)
'Because the above is browser based it places the file in your downloads folder this cannot be avoided
'The below method opens the downloads folder automatically
'you could add a message box or notification here if required
'most times people do not clear out thier download history its best to let the user know to use the greatest number of your file.apk
'you should disable any services or processes that your current application uses before allowing the user to install the new application
Dim Intent1 As Intent
Intent1.Initialize(Intent1.ACTION_MAIN, "")
Intent1.SetComponent("com.android.providers.downloads.ui/.DownloadsListTab")
StartActivity(Intent1)
'Finally exit application
ExitApplication
End Sub
</code>
under iis create a mime type by right clicking on your server name then click properties. select mime types button and add .apk with the mime type
application/vnd.android.package-archive
Next
create a download.aspx page or whatever you want to call it
add the following to your page
<html>
<asp:HyperLink ID="lnkdwnload" runat="server" NavigateUrl="~/myfile.apk">Download myfile</asp:HyperLink>
</html>
Next in web.config add the following under <system.webserver>
<staticContent>
<mimeMap fileExtension=".apk" mimeType="application/vnd.android.package-archive"/>
</staticContent>
Restart IIS and your users can now download your app
After More Research the user had to click the link then go to the downloads folder to install the application, if you want to use a pretty view, graphic or whatever use the url method above, else it is possible to use the method below after you have set your iis settings
<code>
Sub getNewVersion()
Dim DlApk as intent
Dim uri as string
'This will directly start the download of your file on the iis server
uri = "HTTP PATH TO YOUR APK FILE"
DlApk.Initialize(DlApk.ACTION_VIEW,uri)
StartActivity(DlApk)
'Because the above is browser based it places the file in your downloads folder this cannot be avoided
'The below method opens the downloads folder automatically
'you could add a message box or notification here if required
'most times people do not clear out thier download history its best to let the user know to use the greatest number of your file.apk
'you should disable any services or processes that your current application uses before allowing the user to install the new application
Dim Intent1 As Intent
Intent1.Initialize(Intent1.ACTION_MAIN, "")
Intent1.SetComponent("com.android.providers.downloads.ui/.DownloadsListTab")
StartActivity(Intent1)
'Finally exit application
ExitApplication
End Sub
</code>
Last edited: