Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
mediaexplorer74 committed Jun 9, 2022
1 parent 5aefbcd commit 20ee336
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 57 deletions.
81 changes: 43 additions & 38 deletions Andro2UWP/Andro2UWP.Shared/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -775,64 +775,69 @@ private static async System.Threading.Tasks.Task ReadToastsList(bool bMsg)
return;
}

// NOTE: for ANDROID - don't show the whole list of notifications (skip already sended toasts)
// NOTE: for ANDROID - don't show the whole list of notifications (skip already sended toasts)
#if !__ANDROID__
if (!p.od.IsOneDriveOpened())
{
await p.od.OpenOneDrive(true, bMsg);
}

System.Collections.ObjectModel.Collection<Microsoft.OneDrive.Sdk.Item> filesy =
System.Collections.ObjectModel.Collection<Microsoft.OneDrive.Sdk.Item> od_files =
await p.od.OneDriveGetAllChildsSDK("Apps/Andro2UWP/", false, true);

// App.sToasts.Clear();

foreach (var filek in filesy)
{
string fileNameData = filek.Name;
string sTmp = "";

if (!fileNameData.EndsWith(".toast.txt"))
if (od_files != null)
{
foreach (var od_file in od_files)
{
continue; // this is not a toast file
}
string fileNameData = od_file.Name;
string sTmp = "";

if (!fileNameData.EndsWith(".toast.txt"))
{
continue; // this is not a toast file
}


// check if we have one already by accident - if so, we don't load it
bool bAlready = false;
foreach (var oldToast in App.sToasts)
{
if (oldToast.sFileName == fileNameData)
// check if we have one already by accident - if so, we don't load it
bool bAlready = false;
foreach (var oldToast in App.sToasts)
{
bAlready = true;
break;
if (oldToast.sFileName == fileNameData)
{
bAlready = true;
break;
}
}
}
if (bAlready)
continue;
if (bAlready)
continue;

var toast = new App.JedenToast();
toast.sFileName = fileNameData;
var toast = new App.JedenToast();
toast.sFileName = fileNameData;

fileNameData = fileNameData.Replace(".toast.txt", "");
fileNameData = fileNameData.Replace(".toast.txt", "");

int iInd = fileNameData.LastIndexOf("-");
sTmp = fileNameData.Substring(iInd + 1); // sTmp == oItem.dDate.ToString("yyyy.MM.dd_HH.mm")
fileNameData = fileNameData.Substring(0, iInd);
toast.displayDate = sTmp.Replace("_", " "); // the file has an underline as a date and time separator
//public DateTimeOffset dDate; - not used for ListItems
int iInd = fileNameData.LastIndexOf("-");
sTmp = fileNameData.Substring(iInd + 1); // sTmp == oItem.dDate.ToString("yyyy.MM.dd_HH.mm")
fileNameData = fileNameData.Substring(0, iInd);
toast.displayDate = sTmp.Replace("_", " "); // the file has an underline as a date and time separator
//public DateTimeOffset dDate; - not used for ListItems

iInd = fileNameData.LastIndexOf(".");
sTmp = fileNameData.Substring(iInd + 1); // sTmp == oItem.iNumber.ToString("00000")
int iNumber;
int.TryParse(sTmp, out iNumber);
toast.iNumber = iNumber;
iInd = fileNameData.LastIndexOf(".");
sTmp = fileNameData.Substring(iInd + 1); // sTmp == oItem.iNumber.ToString("00000")
int iNumber;
int.TryParse(sTmp, out iNumber);
toast.iNumber = iNumber;

toast.sDevice = fileNameData.Substring(0, iInd);
toast.displayDevice = ""; // for now, because only one; then you can add device ... in settings?
toast.sDevice = fileNameData.Substring(0, iInd);
toast.displayDevice = ""; // for now, because only one; then you can add device ... in settings?

toast.sOneDriveFileId = filek.Id;
toast.sSource = "TOBEREAD";
toast.sOneDriveFileId = od_file.Id;
toast.sSource = "TOBEREAD";

App.sToasts.Add(toast);
App.sToasts.Add(toast);
}
}
#endif
}//
Expand Down
4 changes: 2 additions & 2 deletions Andro2UWP/Andro2UWP.UWP/Andro2UWP.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
</PackageCertificateThumbprint>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
<AppxBundle>Always</AppxBundle>
<AppxBundlePlatforms>x86|arm</AppxBundlePlatforms>
<AppxBundlePlatforms>arm</AppxBundlePlatforms>
<AppInstallerUpdateFrequency>0</AppInstallerUpdateFrequency>
<AppInstallerCheckForUpdateFrequency>OnApplicationRun</AppInstallerCheckForUpdateFrequency>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
Expand Down
2 changes: 1 addition & 1 deletion Andro2UWP/Andro2UWP.UWP/Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:uap4="http://schemas.microsoft.com/appx/manifest/uap/windows10/4" xmlns:iot="http://schemas.microsoft.com/appx/manifest/iot/windows10" IgnorableNamespaces="uap mp uap3 uap4 iot">
<Identity Name="Andro2UWP1" Publisher="CN=media" Version="1.0.15.0" />
<Identity Name="Andro2UWP1" Publisher="CN=media" Version="1.0.20.0" />
<mp:PhoneIdentity PhoneProductId="d0cc5bdd-f438-4335-a112-49cb246ce412" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>Andro2UWP</DisplayName>
Expand Down
33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
# Andro2UWP
# Andro2UWP 1.0.20-alpha

## Abstract

My attempt to recover PKar70's Andro2UWP project, branch 10.2002.5

Technical version (build) 1.0.15.0

Status: alpha (RnD)
- Technical version (build): 1.0.20.0
- Status: alpha (RnD)

## Progress
- Transferring/porting OneDriveDroid and OneDriveUWP to OneDrive UNO in progress
- RU Localization realized (in common)
- Android Sync Engine recovered
- Mobile UWP version recovered a little
- Real toast notifications constructed + test toast sending added :)
- one great problem is still here: the system 15-min timer is so strange... IMHO, huge intervals are terrible thing :)
- OneDriveUNO created instead of OneDriveA-OneDriveUWP (in progress; file transfer goes with some errors/bugs)
- RU Localization realized
- Android Sync Engine recovered (partially)
- Mobile UWP W10M compatibility
- Real toast notifications constructed + test toast sending added (but not full-tested yet)

## Big problems
- One great problem is still here: the system 15-min task sheduling (op. system timer problems?)
- Android App freeze and UWP W10M background work (timer) freeze :(


## Idea (Goal)
Expand All @@ -25,7 +27,7 @@ The beginning starts at this discussion: https://forum.xda-developers.com/t/new-
## Progress
Phases of "building the solution":

[1] RnD +- [60%]
[1] RnD +- [70%]

[2] Design +- [30%]

Expand Down Expand Up @@ -55,7 +57,7 @@ It doesn't use any other data, and only data it send (to same OneDrive folder) a
sender names and notification filters, both created by you.

## Requirenments
- Win SDK : 14xxx
- Win SDK : 14xxx (min.) and 19041 (recommended)
- Targets: ARM; x86

## My "Workbench"
Expand All @@ -69,8 +71,8 @@ Used Workloads:

# Contribute!
There's still a TON of things missing from this proof-of-concept (MVP) and areas of improvement
which I just haven't had the time to get to yet.
- UI Improvements (for GTK, for example, or for each one of supported mutli-platforms)))
which I just haven't had the time to get to yet:
- UI Improvements (for GTK, for example, or for each one of supported multi-platforms)
- Additional Language Packages
- Media Transferring Support: screenshots, etc. (for the brave)

Expand All @@ -83,7 +85,8 @@ With best wishes,


## Thanks!
I wanted to put down some thank you's here for folks/projects/websites that were invaluable for helping me get this project into a functional state:
I wanted to put down some thank you's here for folks/projects/websites
that were invaluable for helping me get this project into a functional state:
- [Piotr Karocki](https://github.com/pkar70/) - Great C#/Xamarin/UNO Platform developer
- [Andro2UWP](https://github.com/pkar70/Andro2UWP) - Original Andro2UWP

Expand Down
2 changes: 1 addition & 1 deletion status.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
v1.0.15-alpha
v1.0.20-alpha

Work in progress

0 comments on commit 20ee336

Please sign in to comment.