[APP] MRTG Plugin for Today Screen for WM6.1+ - Windows Mobile Apps and Games

Introduction
This is a small application meant for system administrators / web site owners.
You can see, at a glance, two images that represent the server status. In fact, the application is a periodical image downloader (I have chosen to download MRTG generated images though). The reason is that my web server gets spammed a lot thus I like to keep an eye on the load - not real time, but just to have a 'health' overview.
Below you have a screenshot of the application in action:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Requirements:
a) Screen with at least 480px on the short side.
b) Access to a web server where you have administrative rights and you can generate statistics using mrtg.
c) works WM6.1 standard today screen only.
d) Application is not signed - so you need a ROM image that allows this type of install.
Limitations:
a) No configuration screen yet, you have to edit the registry to setup the URLs to the two images as well as the update time (in minutes).
b) No security (HTTPS, authentication, etc). Use some long folders path to serve the images from the web server.
Configuration
To configure the application you need to configure MRTG to generate 2 small images (resolution 225×93) on your server, and then, once you see test the images in the browser and make sure they work, just update the registry on the phone so that it points to the two URLs.
It is up to you to choose which values to monitor, for example, SMTP concurrency / HTTP traffic / CPU, etc.
Also, as you might already know, MRTG generates a 4 images per each monitored value, and those are hourly, daily, monthly and yearly. I find the daily images to give the best overview, but that is up to you.
Registry keys you will have to modify:
HKLM\Software\Microsoft\Today\Items\MRTGPlugin\0 -> url to the image on the left.
HKLM\Software\Microsoft\Today\Items\MRTGPlugin\1 -> url to the image on the right.
HKLM\Software\Microsoft\Today\Items\MRTGPlugin\Refresh -> update interval (in minutes). Defaults to updates every 30 minutes.
A bit of help with the MRTG configuration:
Since the phone resolution is limited to 480px (I have only tested on my Sony X1) I choosed fixed size images (225x93). Thus, two can fit one next to the other, have good visibility, and do not occupy too much of the screen real estate.
MRTG allows control of the generated image size, but with a trick. To the size that you specify, MRTG adds some paddings, so that it can render legends, axis of the graphs, etc. Thus, by trial and error, I found that to generate the 225x93 image size, the XSize / YSize parameters have in fact to be 125x58:
#-------------------------------------------------------------------
Title[smtp]: SMTP Concurrency - FQDN
MaxBytes[smtp]: 100
AbsMax[smtp]: 500
Options[smtp]: gauge
Target[smtp]: `/usr/local/bin/qmailmrtg7 t /var/qmail/supervise/qmail-smtpd/log/main`
PageTop[smtp]: <strong>FQDN - SMTP Concurrency</strong>
ShortLegend[smtp]: SMTP
YLegend[smtp]: max SMTP
Legend1[smtp]: SMTP
LegendI[smtp]: SMTP
LegendO[smtp]: SMTP
WithPeak[smtp]: ymwd
XSize[smtp]: 125
YSize[smtp]: 58
Uninstall
If you want to uninstall, you need to remove the two log files created on the root of the file system (Downloader.log.txt and MRTGPlugin.log.txt) as well as clearing the "Downloader.exe" system notification (for example, using the "Check Notifications" program)
Download
Download link: MRTGPlugin_1.0.zip
Homepage with more detailed instructions is here.
Please do not make mirrors of the archive, I'd like to keep track of the number of downloads.
I hope some will consider the application useful
[PS: links are not here yet because I don't yet have enough posts to post them. Once they will be validated, they will appear - so it should be shortly].

I've discovered a small issue with, it fails to ask the plugin to refresh once the images are downloaded in the background.
This is not a big problem as you can generate the refresh manually just by navigating up/down on the today screen.
However, the fix is version 1.1 which can be downloaded from the homepage above (or instead of the MRTGPLugin_1.0.zip download URL, change the id=20 to id=21).
I cannot modify the link on the above post yet (will do once I have enough posts) but for now, you have to edit the URL to id=21 or visit the home page.

Related

[APP][WEB] tBattery Graphical Analyzer

tBattery Graphical Analyzer
I always thought that tBattery, which is included in the EnergyROM for instance, is a nice tool with huge potential. Because I couldn't find an application to visualize the vast amount of data tBattery creates I decided to knock something up real quick.
What it is and what it does
It is a web application for visualizing the log output from tBattery. Currently, it displays the battery life percentage over time and not much more but I intend to include more features if there's actually someone else out there who uses tBattery.
It relies on JavaScript (jQuery & jqplot) for displaying the graph, so you might want to activate it. Also, since I didn't do any extensive testing yet I'd recommend a recent version of Chrome, Firefox, Safari or Opera Mobile 10. Well, or Internet Explorer.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Why it might be useful
As stated, with all the sensors being read (life percentage, temperature, current, voltage, mAh etc.) you could visualize a lot of data and create a usage profile for yourself. You could compare your usage patterns with others and get hints, for instance about your charging habits.
Please let me know if you are interested in that kind of web-based extended visual logging.
Current limitations
Displays only life percentage and the time passed
You cannot download the graph, screenshot is the only way to save
There can be quiet weird values for the x-axis, like 1020 minutes. I'll fix that
Planned features
Display date/time on mouse cursor position in graph
Choosing the value(s) you want to display
Anonymous storage of logs and graphs for later reference
User registration for storing logs and allowing comparisons between devices/ROMs etc
Simple download of graphs as images
Let me know what features you're missing and I will try to add them.
Check it out
Just copy & paste the content of the log file and hit [Show me].
tBattGraph
What about tBattery
I also attached tBattery, extract the archive onto your device (after virus checking). God knows where this tool comes from but all credits to the creator.
Reserved.
This sounds interesting, very much so as i feel my battery average run-out time is way to low Thanks
This is an very interesting application. Please take also a look to the forum.ageye.de. These guys have also to fight against the same old problem . Please send some greetings to Joerg from ageye .
Please write also a little app or html site so that we can do the graph on our phone. That will be the killer app of this year, i think. Everyone have to check his own battery from time to time. And then the possibillty to skin this app (dusking). More killerapp then that is not possible.
Hachja, das waere eine Traumsoftware
Any news on the app ? I'm really interested.
seems to be very useful application.
thanks for sharing ..
thanks to the creator of this app..
thanks man... you awesome
Thanks for all the kind words! That motivates me to pick up the project again; what features would you like to see?
> User registration for storing logs and allowing comparisons between devices/ROMs etc
It will be my best function!
Maybe export to csv to deeper analize
This could be very interesting for comparing the effect of flashing new roms, it's been speculated many times that it takes a few cycles to settle in a battery in a new ROM.
Also, will give this a try using my spare battery, would be interesting to see how the capacity claims match up to the original battery.
s2007 said:
> User registration for storing logs and allowing comparisons between devices/ROMs etc
It will be my best function!
Maybe export to csv to deeper analize
Click to expand...
Click to collapse
I'll see what I can do over the weekend
// Edit:
Also, frontpage, thx!
hello
i have question, because i don't know that is normal.
The program don't save log's when phone is in sleep mode?? Because when i put my diamond i that mode program stops logging, and i want to know how much power does it take in this particular mode.
I thought that app saveing information all the time...
Sorry for my english
Oh, I'm definitely trying this.
WM rules, Droid drools!
! Cannot execute "C:\Users\Azlan96\AppData\Local\Temp\Rar$EX08.258\tBattery.exe"

Huawei App Messaging Service Part2

Huawei App Messaging Service Part2
*Now, you need to set sending time parameters like started and ended time also trigger event time
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
​*Ignore the conversion event configuration. Now, click Save in the upper side to save the configurations.
​Developing App Messaging
We can create a layout for the main page using the code below.
("https://gist.githubusercontent.com/hakki2391/78cdd988dae0ffc6910aa0a257d47790/raw/d8e45fbd33f8be1050d456393f015dd6708b3bdc/xml")
Then, we need to initialize the AGConnectAppMessaging instance using the lines below.
("https://gist.githubusercontent.com/hakki2391/83a44247a75ab4cdec5d38d53860aa28/raw/355e5fbc64fb4fc4a0812d2945edf3ae3a26e2fc/AGConnectAppMessaging")
We need to obtain the device AAID and generate it in the TextView of the project for subsequent testing using code part below.
("https://gist.githubusercontent.com/hakki2391/97b9cb489a3030443f53b5a45b69e321/raw/7a4383cfb72d0816ed6908000c69648ff65092a4/AAID")
On this point, we need to set the flag for forcibly requesting message data from the AppGallery Connect server so that data can be obtained in real time during testing.
("https://gist.githubusercontent.com/hakki2391/8efa94934b1613f9c082b68b6a0d498b/raw/2f150abbb558465f8f801a82f553a7384ef9bc76/gistfile1.txt")
Now, we need to set the pop-up message layout. Different messages are displayed for the tap and closing events.
("https://gist.githubusercontent.com/hakki2391/a2f463f7f3d3b16304fdc581032f5cd7/raw/a3ca27c60a7eb192a10627466b8aeebf565057ef/gistfile1.txt")
Then we will set the button tap event for applying the custom layout.
("https://gist.githubusercontent.com/hakki2391/309ad98ffa22942b53ed5d6cfae14dec/raw/8a9b969313dcbdb470f0a9a45f522e268e78593f/gistfile1.txt")
Now, we will set the button tap event for canceling the custom layout.
("https://gist.githubusercontent.com/hakki2391/0cbc31fb868c05fc5631742d7f983da1/raw/ec1ecb2be2759e3fda7d4419e4e9d7b1d1d2db6e/gistfile1.txt")
In this point, we can customize the layout like below.
("https://gist.githubusercontent.com/hakki2391/c4502ad5e80338bca3f85510463977bf/raw/28f72e53ceeaa0efe40f2781cea506821ac920ba/gistfile1.txt")
Finally, we can customize the layout file, inherit the AGConnectMessagingDisplay class, and rewrite the displayMessage method to display the layout.
("https://gist.githubusercontent.com/hakki2391/32a1ba37a0b092faf7a7923ec1044d72/raw/9bcc53cedda0419187ec58cd45fe1b517b9678e8/gistfile1.txt")
Lets test the App Messaging Demo
When we run the demo app, we will see the screen below.
After that we will select the created message from the message list in the AppGallery Connect and click Test.
Now, we need to click Add test user on the screen.
On this point, we will enter the AAID of the test mobile phone and save test.
If we want to use custom layout, we need to click on Set Custom View in the test mobile phone’s application. We have to repeat steps 3 and 4 and click Save to reset the test mobile phone. Switch the app to the background and then to the foreground after at least a second. The message in custom layout is now displayed.
If we want to restore the custom layout to the default layout, we must click Close Custom View and reset the test cell phone. Now we should switch the app to the background and then to the foreground after at least a second. The default layout is displayed.
Sample Code for APK
We can find the sample apk code using the link below. We can understand how to use App Messaging clearly.
("https://developer.huawei.com/consumer/en/codelab/AppMessaging/index.html#10")
FAQs
We may find FAQs about App Messaging on the link below.
("https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-appmessage-faq")
Thank you for taking your time and reading my article. Hope to see you in my next forum.xda article.

Problems Confronted During Parameter Obtaining After Deep Link Redirection to a Quick App

Symptom
A user is redirected by a deep link with parameters to the home page of a quick app. The launch mode of the home page is set to singleTask. When the quick app receives parameters carried by the deep link, the following situation occurs:
l If the quick app has not been opened, the quick app can receive the parameters properly.
l After a user is redirected to the target page in the quick app for the first time, the user presses the home button to switch the quick app to the background. Then the user is redirected to the home page of the same quick app by another deep link with different parameters. The home page fails to receive parameters of the deep link. Logs show that the onRefresh lifecycle function is triggered on the home page, but the log information of the onRefresh lifecycle function indicates that the parameters of the previous deep link are used.
The code where the exception occurs is as follows:
Deep link opened first:
hap://app/com.huawei.text?test=first
Deep link opened later:
hap://app/com.huawei.text?test=secon
Code for going to the home page of the quick app:
The parameters received when two deep links open the home page of the quick app are as follows:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Cause Analysis
The user is redirected to the quick app that has been opened through a deep link. The redirection triggers the onRefresh lifecycle function of the page to receive parameters in the deep link. However, it is incorrectly considered that the parameters received in the onRefresh function are the same as those received when the quick app is opened for the first time. That is, the parameters are received in this.xxx format. Actually, the onRefresh lifecycle function contains parameters, which need to be obtained.
Solution
The parameters of the onRefresh lifecycle function are in the data of onRefresh(data) and need to be obtained in the data.xxx format. The correct sample code is as follows:
The following figure shows the effect when parameters are correctly obtained.
For more details, you can go to:
Our official website: https://developer.huawei.com/consumer/en/hms?ha_source=hms1
Our Development Documentation page, to find the documents you need: https://developer.huawei.com/consumer/en/doc/development?ha_source=hms1
Reddit to join our developer discussion: https://www.reddit.com/r/HuaweiDevelopers/
GitHub to download demos and sample codes: https://github.com/HMS-Core
Stack Overflow to solve any integration problems: https://stackoverflow.com/questions/tagged/huawei-mobile-services?tab=Newest
For code, you can check https://forums.developer.huawei.com/forumPortal/en/topic/0203445081228700074

AppGallery Connect 10.5.11 is officially released

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
March 24, 2021 – AppGallery Connect 10.5.11 is officially released! You can now change the password rules for your users on the Settings tab page of Auth Service. Also, App Messaging now provides a Prediction condition to specify your message sending target. We also provide more new functions in version 10.5.11. Let's see what they are.​​1.Public​Web apps: Supported the function of restricting domain names or IP addresses that can access APIs enabled for your web app. View details​​2. Auth Service​Added the function of modifying required password complexity on the Settings tab page. View details​Released Android SDK 1.5.1.300, which supports account reauthentication and unified sign-in of HUAWEI GameCenter accounts and other frequently used game accounts. View details​​3. App Messaging​Added the filter Prediction for selecting sending targets. View details​
4. App Linking​Supported the function of configuring a custom preview page during the creation of a link of App Linking. View details​​5. APM​Released Android SDK 1.5.1.300, which supports the capability for analyzing slow launch details by event and screen loading experience analysis. View details​​6. Connect API​Changed the upper limit of an RPK package uploaded through the Publishing API from 10 MB to 20 MB, and supported PRK games that are compatible with PCs. View details​​7. Billing​Optimized several relevant UI strings and supported the free tier of the pay-as-you-go plan. View details​​8. App release​Changed the upper limit of an RPK package to be uploaded to 20 MB, added the function of configuring promotional videos and a mask layer for mobile quick apps, and added PCs as compatible devices for mobile quick apps. View details​​9. Service enabling​Optimized the service enabling experience on the Manage APIs tab page. View details​​10. App analytics​Added a download button to the Overview page and displayed comparison with similar apps on the Downloads & installs page. View details​​For details about our service updates, please refer to our documentation.​​In addition to these function updates, AppGallery Connect also unveiled its new logo and mobile app.​
The new logo was inspired by the angle brackets (<>) in coding. The two angle brackets are closely linked to form a square, representing the working relationship forged between developers and Huawei in building innovative apps.​
You can install the AppGallery Connect app (Android version) on your mobile device to get instant access to your app information, achieve instant user interaction, and learn about the latest on AppGallery Connect services. Just search for it on and download it from AppGallery.​
For more details:​· AppGallery Connect overview​· Our documentation to find the services you need​· Github to download demos and sample codes​· Stack Overflow to solve any integration problems​
Original link: https://forums.developer.huawei.com/forumPortal/en/topic/0202548982357190269

Upscaling a Blurry Text Image with Machine Learning

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Unreadable image text caused by motion blur, poor lighting, low image resolution, or distance can render an image useless. This issue can adversely affect user experience in many scenarios, for example:
A user takes a photo of a receipt and uploads the photo to an app, expecting the app to recognize the text on the receipt. However, the text is unclear (due to the receipt being out of focus or poor lighting) and cannot be recognized by the app.
A filer takes images of old documents and wants an app to automatically extract the text from them to create a digital archive. Unfortunately, some characters on the original documents have become so blurred that they cannot be identified by the app.
A user receives a funny meme containing text and reposts it on different apps. However, the text of the reposted meme has become unreadable because the meme was compressed by the apps when it was reposted.
As you can see, this issue spoils user experience and prevents you from sharing fun things with others. I knew that machine learning technology can help deal with it, and the solution I got is the text image super-resolution service from HMS Core ML Kit.
What Is Text Image Super-Resolution​The text image super-resolution service can zoom in on an image containing text to make it appear three times as big, dramatically improving text definition.
Check out the images below to see the difference with your own eyes.
Before
After
Where Text Image Super-Resolution Can Be Used​This service is ideal for identifying text from a blurry image. For example:
In a fitness app: The service can enhance the image quality of a nutrition facts label so that fitness freaks can understand what exactly they are eating.
In a note-taking app: The service can fix blurry images taken of a book or writing on a whiteboard, so that learners can digitally collate their notes.
What Text Image Super-Resolution Delivers​Remarkable enhancement result: It enlarges a text image up to three times its resolution, and works particularly well on JPG and downsampled images.
Fast process: The algorithm behind the service is built upon the deep neural network, fully utilizing the NPU of Huawei mobile phones to accelerate the neural network and delivering a speedup that is 10-fold.
Less development time and smaller app package size: The service is loaded with an API that is easy to integrate and saves ROM that is occupied by the algorithm model.
What Text Image Super-Resolution Requires​An input bitmap in ARGB format, which is also the output format of the service.
A compressed JPG image or a downsampled image, which is the optimal image format for the service. If the resolution of the input image is already high, the after-effect of the service may not be distinctly noticeable.
The maximum dimensions of the input image are 800 x 800 px. The long edge of the input image should contain at least 64 pixels.
And this concludes the service. If you want to know more about how to integrate the service, you can check out the walkthrough here.
The text image super-resolution service is just one function of the larger ML Kit. Click the link to learn more about the kit.

Categories

Resources