Huawei Lite Wearable - issue when displaying image file - Android Q&A, Help & Troubleshooting

Hello!
I am transfering image file to my app on Huawei Watch GT 3 .
It was correctly saved, I have checked its size and content. Everything is okay.
But if I am trying to use this image inside app:
<image src="internal://app/1.jpg" class="img"></image>
Click to expand...
Click to collapse
with simple style:
.img {
text-align: center;
justify-content: center;
width: 80%;
height: 80%;
border-color: red;
stroke-width: 2px;
}
Click to expand...
Click to collapse
It not works at all. Only default black screen visible.
Docs said that:
The <image> component supports access to images in the private directory of an application.5+
(https://developer.harmonyos.com/en/...eferences/lite-wearable-file-0000001176751380)
Click to expand...
Click to collapse
I was trying to check on different files (small, medium, big), formats (jpg, png, bmp) but the result is the same.
In case I am using resource files instead of "internal://app" approach - everything is displaying correctly, but the main purpose of my question - to find the answer once and for all. I think it can help lots of devs.
compileSdkVersion is 5.
Wearable OS: 3.0.0.73
Can you please tell where is my mistake?

As you can see, now I am displaying path to file under image.
What can I see with transfered file:
{
"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"
}
At the same time, everything is okay with local resource file
I also tried to use:
DevEco 2.1.0.501, 3.1.0.100, 3.1.0.400
Compile SDK: 5 and 6

It is not "hack and android" category because there are nobody (in hell too) even know how to work with "huawei lite wearable sdk". It is the most stupid idea to move category from people who somehow can tell something to category with 100% other stack and knowledge.

Related

[APP] Calc+ v1.0

Hi. This is the first app from PDA4PDA developers .This application, is very easy to use and finger friendly.
Also it has programming ability.so you can write any program for easy with it and recall your program any time.
This program also has CMD using feature that means you can use commands, for doing your calculations and it has some mere abilities like using variants. For using this, you have to go to "My functions" tab and click on CMD button.
But don’t worry! if you want to start programming with it, it's very easy. You can use the programs help to learn it fast.
{
"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"
}
Image2
Image3
Image4​​ :Features
Easy To Use
Programming ability
Scientific features
Finger Friendly
Nice Design
Skin able
Multiscreen
Very large numbers support with usingScientific notation
Light
*For add your functions to "My functions" part, you have to copy .func files to "Main memory/My
.functions" folder
programmer: Pooyaparsa PINGsft[at]gmail.com
Graphics and help translator: Nimaheravi pda4pda[at]gmail.com
Graphics: Arashnikkhah Arasheek96[at]yahoo.com
apps.PDA4PDA.com
use help file for learn how to use
Download : http://up.pda4pda.com/uploads/Calc+_1.0_pda4pda.com.zip
Help : http://up.pda4pda.com/uploads/help.zip
great
best wishes for u
Hi H_R_V,
The Calculator is good! I have tested it on my device, its working fine. I’m sure that you have made more apps. Please share it with us.

[Q] imageButton with text

Hello, i hope i'm in the right section.
I need some help with display within a game project. I did some research and i can't find a convenient answer. I want to use imageButtons and not just Buttons. I currently use setImageResource (drawable) for my unit and setBackgroundResource (drawable) for background.
I'm missing some info on the screen, let's say HP for an unit or any kind of text.
Here's what it looks like :
I want to have something like this :
{
"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"
}
Is there a way to do so ?
Thanks for your time
maitokeul said:
Hello, i hope i'm in the right section.
I need some help with display within a game project. I did some research and i can't find a convenient answer. I want to use imageButtons and not just Buttons. I currently use setImageResource (drawable) for my unit and setBackgroundResource (drawable) for background.
I'm missing some info on the screen, let's say HP for an unit or any kind of text.
Here's what it looks like :
I want to have something like this :
Is there a way to do so ?
Thanks for your time
Click to expand...
Click to collapse
While i'm not completly sure (my month of devolpment hasnt gotten me that far) you should be able to edit the acutal image that you have for the charectors with image editing software like gimp. You just go to the add text tool and add the text that you want to. I will edit this post if i find a more efficent way of doing this.

[Q] Need A simple app made, who wants a project?

OK, this app has 4 pages but pull in information from a url/api so some data will need to be save by the user and then displayed in a table.
The data is given in json or xml or csv.
I will show a picture and then say what each page is.
{
"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"
}
Page 1: this is where the use will have to save their API, and link to how to find their API page
Should show the first time or when changing their API
Page 2:
Pick Date: will by default be the past 7 days, but allow them to pick what ever days the want
Chart: this is what the information that needs pulled it, using a url with the api code and dates
Page 3: Just shows what I want in a menu
Page 4: is the page that tells someone how to find there API
ADDED: The ads (why did I put add?) lol I want this to be a simple thing that will show 3 ads and link to where ever I want.
I need the frame work built, and coding done. I will do the images and icons, ad banners
------------------------------
The url for the api to get the information looks like this
http://this-website.com/stats/stats...art_date=2012-05-01&end_date=2012-05-08&group[]=Stat.date
You will see:
1: /stats.xml (pick cvs, xlm or json)
2: api_key=AFF2rkPVl33rgoh37fON2dd5Nov2nk5d (saved by user)
3:&start_date=2012-05-01&end_date=2012-05-08 (for the dates)
Who can get this going for me? And what is it going to cost?
Hoping for some better luck, I would still love to have this app made. Give me a fair price for your time!

[Q] How to make the hardware keyboard on the SK17i work?

Okay, so I have a funny and strange a problem. This problem exists in several ROMs. I can not change the hardware layout of my keyboard to qwerty-no-dk (I'm narveejun). So I tried to cat the qwerty-no-dk file in the console. It looked fine. Except for... at key id 2.10 instead of saying, as it does on my linux console on my ubuntu laptop,
<Key id="C2.10" data="å" />
Click to expand...
Click to collapse
it instead said:
<Key id="C2.10" data="" />
Click to expand...
Click to collapse
.
Notice that small but oh so important missing letter there? So none of the letters are remapped. They are all US English. :crying:
Soooo... Looking at four simple files in the console with the letters:
UTF-8/UTF-16/ANSII ASCII/Unicode (depending on which format I had saved it in)
øæå
ÆØÅ
Click to expand...
Click to collapse
I cat each of the four files in the console and none of the non-English letters shows up. File1 (UTF-8 formatted one, same format as the qwerty-no-dk.xml-keyremap-file is saved in) makes the console throw a fit even and end up at the top of the screen. So this is what a screenshot looks like:
{
"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"
}
Isn't that strange? The console can't even cat the letters! Not so strange then that the phone doesn't remap the keys. So help? How to fix this? This is just after install, nothing has been fiddled with, no program install, nothing. So... help?

[Q] isolated storage - vb.net

How can i (Create,Read,Write,Delete) Files and Directories in Isolated Storage on Windows Phone?(VB.Net)(Visual Studio 2012)
------------------------------------------------------
i use this codes but i see some error.
Create file:
Code:
Dim sw As New StreamWriter(New IsolatedStorageFileStream("FirstRun\a.txt", FileMode.Create, file))
sw.WriteLine(Textbox1.text)
read form isolated storage:
Code:
Dim file As IsolatedStorageFile = IsolatedStorageFile.GetUserStoreForApplication()
file.CreateDirectory("UserTexts")
Dim sw As New StreamReader(New IsolatedStorageFileStream("UserTexts\user.txt", FileMode.Open, file))
read file:
Code:
TXTBlock.Text = sw.ReadToEnd()
sw.Close()
Delete file:
Code:
Dim file As IsolatedStorageFile = IsolatedStorageFile.GetUserStoreForApplication()
file.DeleteFile("Temp\a.txt")
Delete folder:
Code:
file.DeleteDirectory("Temp")
Create folder:
Code:
Dim file As IsolatedStorageFile = IsolatedStorageFile.GetUserStoreForApplication()
file.CreateDirectory("FirstRun")
please give me correct codes.
What error do you see?
mcosmin222 said:
What error do you see?
Click to expand...
Click to collapse
Error 1 Value of type 'System.IO.FileAccess' cannot be converted to 'System.IO.IsolatedStorage.IsolatedStorageFile'
Dim sw As New StreamReader(New IsolatedStorageFileStream("UserTexts\user.txt", FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite, file))
Methods have overloads. Check them out. If you don't know what a method overload is, check wikipedia.
http://en.wikipedia.org/wiki/Function_overloading
mcosmin222 said:
Dim sw As New StreamReader(New IsolatedStorageFileStream("UserTexts\user.txt", FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite, file))
Click to expand...
Click to collapse
{
"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"
}
it geting error.
shayan4shayan said:
it geting error.
Click to expand...
Click to collapse
Replace file with IsolatedStorageFile.getuserStoreForApplication()

Categories

Resources