public void downloadIOSFile() { AppDownloadOBJDAO dao = new AppDownloadOBJDAO(); AppDownloadOBJ obj = new AppDownloadOBJ(); obj = dao.GetAppFiles(); Response.Redirect(obj.IOSApp); //itms-services://?action=download-manifest&url=https://crestron.sit.nyp.edu.sg/nypIprojectionIOSDownload/manifest.xml //This is the url to download IOS App }
public ActionResult OpenPWALink() { AppDownloadOBJDAO dao = new AppDownloadOBJDAO(); AppDownloadOBJ obj = new AppDownloadOBJ(); obj = dao.GetAppFiles(); return(Redirect(obj.PWALink)); //https://crestron.sit.nyp.edu.sg/nypiprojection/ //This is the url for the pwa }
public void downloadAndroidFile() { AppDownloadOBJDAO dao = new AppDownloadOBJDAO(); AppDownloadOBJ obj = new AppDownloadOBJ(); obj = dao.GetAppFiles(); byte[] bytes = obj.AndroidApp; Response.Clear(); MemoryStream ms = new MemoryStream(bytes); Response.ContentType = "application/apk"; Response.AddHeader("content-disposition", "attachment;filename=nypIprojectionApp-Signed.apk"); Response.Buffer = true; ms.WriteTo(Response.OutputStream); Response.End(); }
public AppDownloadOBJ GetAppFiles() { conn.Open(); AppDownloadOBJ obj = new AppDownloadOBJ(); string query = "Select * from tblAppDownload where ID = '1'"; SqlDataAdapter da = new SqlDataAdapter(query, conn); DataSet ds = new DataSet(); da.Fill(ds, "tblAppDownload"); int rec_count = ds.Tables["tblAppDownload"].Rows.Count; if (rec_count > 0) { DataRow row = ds.Tables["tblAppDownload"].Rows[0]; obj.AndroidApp = (byte[])row["AndroidApp"]; } else { obj = null; } conn.Close(); return(obj); }