UPdate album art directly from your device (HELLO S2P users!) - Mogul, XV6800 ROM Development

I have a script which will look for album art from albumart.org and place it in the proper folder. This is great if you use S2P.
The script assumes a couple things:
- you music is in \storage card\music\$artist\$album
-YOu will need GSFinder
-the folder view dropdown is visible (I scrape the path in the top dropdown to get the artist and album.
-You need to be able to execute the script from within GSFinder. (map script to button, or use a cascading menu that allows you to select the script file)
THe script basically sends the artist and album to the website,
parses the page
then pulls the image that has atag that matches the album
I get about 70% success rate....which is FINE WITH ME!
---------------------------------------------------------
musicroot = "\Storage Card\Music\"
d = windowtext(30,30)
message(d)
d = replace(d,musicroot,"")
arrMusic = split(d,"\")
theartist = arrMusic[1]
thealbum = arrMusic[2]
#message (theartist)
#message (thealbum)
thepath = "\Program Files\MortScripts\"
thefile = "dl1.html"
#connect("Data Network Connect")
connect("The Internet")
Download ("http://albumart.org/index.php?srchkey=" & theartist & "+" & thealbum & "&itempage=1&newsearch=1&searchindex=Music",thepath & thefile)
strParse = ReadFile(thepath&thefile)
mainleft = find(strParse,"main_left")
#message(mainleft)
arttitle = find(strParse, "title=", mainleft)
#message(arttitle)
if (arttitle>0)
srcstart=find(strParse, "src=", arttitle)
imagestart = srcstart + 5
#message("imagestart:" & imagestart)
imageend = find(strParse, ".jpg", imagestart) + 4
#message("imageend:" & imageend)
imagepath=substr(strParse,imagestart,imageend-imagestart)
message(imagepath)
Download (imagepath,musicroot&theartist & "\" & thealbum & "\folder.jpg")
message("refresh folder")
endif
--------------------------------------------------
Hope you enjoy it....I LOVE IT!

Related

Change the display of the clock in the taskbar

i have tried this hack and it does not work for me. i have the htc x7500
does it work for you
thanks
Change the display of the clock in the taskbar
The clock in the taskbar can be changed to show not only the time, but also the date, or just the date, or nothing at all.
To show nothing:
HKLM\Software\Microsoft\Shell\TBOpt = 0 (DWORD decimal)
To show just the clock:
HKLM\Software\Microsoft\Shell\TBOpt = 1 (DWORD decimal)
To show just the date:
HKLM\Software\Microsoft\Shell\TBOpt = 2 (DWORD decimal)
To show both the date and the clock:
HKLM\Software\Microsoft\Shell\TBOpt = 3 (DWORD decimal)
date and time on the tb
for me following cab works ok, but I have other problem - when keyboard is closed on the visible bar I see only full hours - instead of 22:36 I see only 22:00 till 23. Anyone has a clue how to change it?
try moving the volume button up when the mini display is on
irus said:
try moving the volume button up when the mini display is on
Click to expand...
Click to collapse
Wow, I didn't even know that the mini display changed! I didn't have any problems showing the minutes, but I did not know about the volume button changing the display
thanks for the suggestion.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell\
Create a binary value named "TBOpt" and set its value to "13 00 00 00
then
1) Open ur registry editor (either PHM Registry Editor or Resco Explorer 2003).
2) Go to HKEY_LOCAL_MACHINE\nls\overrides
3) Create 1st String Value: Name = S1159 & String = Am
4) Create 2nd String Value: Name = S2359 & String = Pm
5) Create 3rd String Value: Name = STFmt & String = hh:mm t'M '
6) Soft-reset.

[WM6.5] [Programs] JML.... tools (02-Nov-2010)

Programs Used in JMLToday <= 5.92​
Post#2 : Programs Informations
JMLPicture.exe See Post#3
Build a picture from multiple images/texts
JMLMenu.exe
Displays a context popup menu.
JMLComm.exe
Phone on/flight-mode, Wifi on/off, BT on/off/discoverable, Data on/off
JMLCalendar.exe
Saves the next appointments in registry
JMLSms.exe
Saves SMS in registry
JMLContacts.exe
Saves the next birthdays/anniversaries AND Favorites contacts in registry
JMLMeteo.exe
Saves the MSN or ACCU or GOOGLE weather informations in registry
JMLTasks.exe
Saves the next tasks in registry
Programs Informations ​
JMLMenu v1.80
The menu is configurable via a .mnu file :
- The main menu is [Menu]
- One element per line of menu : label= program;parameters
- One section per submenu : use [] -> label=[mysubmenu]
- External submenu (.mnu file) : use {} -> label={filesubmenu.mnu}
- Separator : sepX=SEPARATOR (X=unique number)
Parameters :
Code:
[b][color=red]-execute[/color][/b] if menu as once choice, it execute it immediately (menu not show)
[b]-x:[/b]X = X coordinate (X clic per default)
[b]-y:[/b]Y = Y coordinate (Y clic per default)
[b]-timeout:[/b]N = timeout in seconds to hide menu (10s per default)
Example : JMLAction.mnu
Code:
[Menu]
Restart Titanium=%JMLTODAY%\JMLToday.exe;-refresh
Update=%JMLTODAY%\JMLToday.exe;-update
Weather=%JMLTODAY%\JMLMeteo.exe;-jmltoday
Configuration=[color=blue][b][Config][/b][/color]
Parameters=[color=blue][b]{JMLParameters.mnu}[/b][/color]
[color=blue][b][Config][/b][/color]
Clock=%WINDOWS%\ctlpnl.exe;cplmain.cpl,16,0
Skin=%JMLTODAY%\JMLTodaySkins.mscr
City=%JMLTODAY%\JMLTodayVille.mscr
Language=%JMLTODAY%\JMLLang.mscr
To Launch :
- in a .pnx file : %JMLTODAY%\JMLMenu.exe;JMLAction.mnu
- in a .mscr script : Run(instPath&"\JMLMenu.exe","JMLAction.mnu")
---------------------------------------------------------------------------------
JMLComm v1.98
Parameters :
Code:
[color=red]-vibrate:duration[/color] = make a vibration (duration=25ms per default)
[color=red]-volume[/color] = toggle vibrate/mute/normal mode[color=red]
-volume:mode[/color] = volume mode : [b]vibrate,mute, normal[/b]
[color=red]-volume:level[/color] = volume level : [b]silent,verylow,low,medium,high,loud[/b]
[color=red]-backlight[/color] = toggle auto/manual mode
[color=red]-backlight:mode[/color] = backlight mode : [b]auto,manual[/b]
[color=red]-backlight:level[/color] = backlight level : [b]mini,low,medium,high,maxi[/b]
[color=red]-gps:timeout[/color] = store latitude/longitude in HKCU\\Software\\JML\\Comm (timeout=60s per defaut)
[color=red]-status[/color] = store some informations in HKCU\\Software\\JML\\Comm
-data = toggle on/off data-connection
-data:on = switch ON data-connection
-data:off = switch OFF data-connection
-phone = toggle on/off phone
-phone:on = switch ON phone
-phone:off = switch OFF phone
-flight = toggle on/off flight-mode
-flight:on = switch OFF phone, wifi, bluetooth
-flight:off = switch ON phone
-bt = toggle 3 states bluetooth
-bt:on = switch ON bluetooth
-bt:discoverable = switch ON with discoverable mode bluetooth
-bt:off = switch OFF bluetooth
-bt2 = toggle on/off bluetooth
-bt2:on = switch ON bluetooth
-bt2:off = switch OFF bluetooth
-wifi = toggle on/off wifi
-wifi:on = switch ON wifi
-wifi:off = switch OFF wifi
Example : turn OFF bluetooth
Code:
instPath = SystemPath( "ScriptPath" )
RunWait(instPath&"\JMLComm.exe", "-bt:off")
exit
---------------------------------------------------------------------------------
JMLCalendar v2.45
Registry structure:
Code:
[HKEY_CURRENT_USER\Software\JML\[color=green][b]Calendar[/b][/color]]
"total" = dword: number of appointments found
[HKEY_CURRENT_USER Software\JML\[b]Calendar[/b]\Cal[color=orange][b]N[/b][/color]]
"oid" = oid item in poom database
"allday" = 0=FALSE, 1=TRUE
"categories" = list of categories
...
"subject" = subject
Parameters for searching :
Code:
-max:N = maximum number wanted (5 per default)
-days:N = number of days involved (5 per default)
-reg:key = registry key to store ("[color=green][b]Calendar[/b][/color]" per default)
Parameters for appointment :
Code:
-dateview:[color=orange][b]N[/b][/color] = open poutlook.exe to view the appointment number N
-deleteall:end = delete all [b]ended[/b] appointments (except reccurring appointments)
-deleteoid:oid = delete an appointment identified by his oid
-notifyoid:oid = show an appointment identified by his oid
---------------------------------------------------------------------------------
JMLSms v1.80
Registry structure:
Code:
[HKEY_CURRENT_USER\Software\JML\[b]Sms[/b]]
"total" = dword: number of SMS found
[HKEY_CURRENT_USER Software\JML\[b]Sms[/b]\Sms[color=orange][b]N[/b][/color]]
"oid" = oid item in SMS in database
"unread" = 1 if unread SMS, 0 otherwise
...
"subject"= subject
Parameters for searching :
Code:
-max:N = maximum number wanted (5 per default)
-read:all = last all type SMS (last unread per default)
-reg:key = registry key to store ("[color=green]Sms[/color]" per default)
Parameters for sms :
Code:
[color=red]-phone:phone-number[/color] = Call a phone number
-reply:[color=orange][b]N[/b][/color] = Send a response SMS
-reply:[color=orange][b]N[/b][/color] = [color=red]-text:"my text"[/color] = Send a pre-defined text response SMS
-mark:[color=orange][b]N[/b][/color] = Mark as read the SMS
-mark:all = Mark as read all SMS
-markid:oid = Mark as read the SMS identified by his oid
-delete:[color=orange][b]N[/b][/color] = Delete the SMS
-delete:all = Delete all SMS
-delete:unread = Delete all Unread SMS
-deleteid:oid = Delete the SMS identified by his oid
-call:[color=orange][b]N[/b][/color] = Call in response to SMS (in order if exist : sender, mobilePhone, homePhone)
-notify:[color=orange][b]N[/b][/color] = show the SMS
-notifyid:oid = show the SMS identified by his oid
-sms:phone-number = Send a response SMS
-sms:phone-number = [color=red]-text:"my text"[/color] = Send a pre-defined text response SMS
---------------------------------------------------------------------------------
JMLContacts v1.95
Registry structure :
Code:
[HKEY_CURRENT_USER\Software\JML\[b]Contacts[/b]\Anniversaries]
"total" = dword: number of contacts found
[HKEY_CURRENT_USER Software\JML\[b]Contacts[/b]\Anniversary[color=orange][b]N[/b][/color]]
"oid" = oid of Contact in database
...
[b][/b]
"picture"= full path of picture file name (in \My Documents\My Pictures...)
Idem for Favorites : in [HKEY_CURRENT_USER\Software\JML\Contacts\Favorites]
Parameters for searching :
Code:
-max:N = maximum number wanted (5 per default)
-days:N = number of days involved (30 per default)
-reg:key = registry key to store ("[color=green][b]Contacts[/b][/color]" per default)
-anniversaries = search in 'Anniversary' field of contact
-birthdays = search in 'Birthday' field of contact
-anniversaries -birthdays are per default
Parameters for contact :
Code:
[color=red]-call:N[/color] = Call a contact
[color=red]-email:address -account:account[/color] = Send a email from an account-name (Outlook per default)
[color=red]-addfavorite:N[/color] = Add a new favorite contact
[color=red]-removefavorite:N[/color] = Remove a favorite contact
[color=red]-callfavorite:N[/color] = Call a favorite contact
-phone:phone-number = Call phone number
-sms:phone-number = Send SMS to phone number
-smsoid:oid = Send SMS to phone number to contact identified by his oid
---------------------------------------------------------------------------------
JMLMeteo v2.55
Registry structure:
Code:
[HKEY_CURRENT_USER\Software\JML\Meteo]
"total" = dword: number of days found
...
[HKEY_CURRENT_USER Software\JML\Meteo\Current]
...
[HKEY_CURRENT_USER Software\JML\Meteo\DayN]
...
Parameters :
Code:
[color=red]-gps[/color] : acquire gps location (as JMLComm.exe)
-msn:code = city code (ex. : [b]FRXX0016[/b])
-lang:ll-ll = language (en-en per default)
-degree:C = C or F (C per default)
-map:m = number of map to download
-accu:code = city code (ex. : [b]EUR|FR|FR002|BORDEAUX[/b])
-metric: = 1 or 0 (1 per default)
-google:code = city code (ex. : [b]Bordeaux[/b])
-lang:ll = language (en per default)
-degree:C = C or F (C per default)
GPS location with built-in jmlPosition:
Code:
-gps
-accu:[b]jmlPosition[/b]
-metric: = 1 or 0 (1 per default)
OR Acquire GPS-location with JMLComm.exe and next call JMLMeteo with :
Code:
-accu:[b]jmlPosition[/b]
-metric: = 1 or 0 (1 per default)
GPS location with Sleuth's myLocation Service :
- first, install http://forum.xda-developers.com/showthread.php?t=607102
- use it to update Latitude/Longitude coordinates
- next, call JMLMeteo.exe with these parameters :
Code:
-accu:[b]myLocation[/b]
-metric: = 1 or 0 (1 per default)
GPS location with Google Latitude:
- first, copy your googleLatitude account in google.ID file.
- next, call JMLMeteo.exe with these parameters :
Code:
-accu:[b]googleLatitude[/b]
-metric: = 1 or 0 (1 per default)
---------------------------------------------------------------------------------
JMLTasks v1.40
Registry structure:
Code:
[HKEY_CURRENT_USER\Software\JML\[color=green][b]Tasks[/b][/color]]
"total" = dword: number of tasks found
[HKEY_CURRENT_USER Software\JML\[b]Tasks[/b]\Task[color=orange][b]N[/b][/color]]
"oid" = oid item in poom database
"categories" = list of categories
...
"subject" = subject
Parameters for searching :
Code:
-max:N = maximum number wanted (5 per default)
-days:N = number of days involved (5 per default)
-reg:key = registry key to store ("[color=green][b]Tasks[/b]][/color]" per default)
-withCompleted = show all tasks
-sort:due = sort by due tasks
-sort:start = sort by date (per default)
manila = store all tasks in HKEY_LOCAL_MACHINE\Software\HTC\\Manila
Parameters for task :
Code:
-view:[color=orange][b]N[/b][/color] = open poutlook.exe to view the task number N
-delete:[color=orange][b]N[/b][/color] = delete the task number N
-complete:[color=orange][b]N[/b][/color] = complete the task number N
-deleteall:due = delete all [b]due[/b] tasks
-deleteall:completed = delete all [b]completed[/b] tasks
-deleteoid:oid = delete the task identified by his oid
-completeoid:oid = complete the task identified by his oid
---------------------------------------------------------------------------------
JMLFavorites v1.00 (SOON)
Registry structure :
Code:
[HKEY_CURRENT_USER\Software\JML\[b]Favorites[/b]]
[HKEY_CURRENT_USER Software\JML\[b]Favorites[/b]\Favorite[color=orange][b]N[/b][/color]]
"type" = type of favorite : '[color=orange]contact[/color]' or '[color=orange]program[/color]'
"picture"= full path of picture file name
"label"= fistname for contact, filename for program
...
Parameters for favorite :
Code:
-call:N = CALL a contact or RUN a program
-add:N = Add a new favorite (contact per default)
-type:contact = with -add parameter, add a '[color=orange]contact[/color]'
-type:program = with -add parameter, add a '[color=orange]program[/color]'
-remove:N = Remove a favorite
---------------------------------------------------------------------------------
JMLPicture Thank you for offering me a beer. All donations (3€, 5$, +) are appreciated !
Build a picture from multiple images/texts (see picture below).
<Picture...> Parameters :
Code:
[b]Width[/b] result picture with
[b]Height[/b] result picture height
[b]Bkg[/b] initial background color (RGB format)
[b]Transparent[/b] set one color of result picture as transparent (RGB format)
[b]Target[/b] png file name of result picture
[b]Source[/b] png file name of background picture
<Image...> Parameters :
Code:
[b]Left[/b] left-coordinate
[b]Top[/b] top-coordinate
[b]Width[/b] with of displaying picture (with of picture per default)
[b]Height[/b] height of displaying picture (heigh of picture per default)
[b]ScaleStyle[/b]
[b]Alignment[/b]
[b]ID[/b] JMLToday ID ITEM (Page is required)
[b]Page[/b] JMLToday Page ITEM (ID is required)
<Text...> Parameters :
Code:
[b]Left[/b] left-coordinate
[b]Top[/b] top-coordinate
[b]Width[/b] with of displaying text
[b]Height[/b] height of displaying text
[b]Value[/b] text value
[b]FontFamily[/b] font name
[b]FontSize[/b] font size
[b]FontStyle[/b] font style : 'italic', 'bold'
[b]Color[/b] text color (RGB format)
[b]Alignment[/b] 'center', 'right' or 'left' (per default)
[b]ID[/b] JMLToday ID ITEM (Page is required)
[b]Page[/b] JMLToday Page ITEM (ID is required)
Example : ClockText.xml
Code:
<Picture Width="400" Height="200" Bkg="192,192,192" Target="%APPDIR%/ClockText.png">
<Image Left="0" Top="0" ID="BGAMPMALARM" Page="Page1" />
<Image Left="20" Top="40" ID="H1" Page="Page1" />
<Image Left="100" Top="40" ID="H2" Page="Page1" />
<Image Left="225" Top="40" ID="M1" Page="Page1" />
<Image Left="305" Top="40" ID="M2" Page="Page1" />
<Text Left="15" Top="140" Value="AM" Color="128,0,0" FontFamily="Tahoma" FontSize="8" FontStyle="Bold,Italic" />
<Text Left="15" Top="160" ID="City" Page="Page1" FontFamily="Tahoma" FontSize="6" FontStyle="Italic" />
</Picture>
@all : add some program informations ..... in Post#2
A++
Hi.
I sure do love command-line tools! I added them to the Mortscript Source Compendium's list.
And to facilitate my testing them to see if magically they will work with wm5 smartphones, I added a Command-Line tester to The Mortifier. So we can browse to the exe and enter our command line parameters. Keeps the old exe and parameters in memory so you can re-test them easily.
Thanks for these.
Hi.
So i was using Message2reg.exe. It seems with wm653 m2reg gives an error.
I am trying to use jmlsms.exe to see if that can work.
Code:
RunWait(SystemPath("ScriptPath") \ "\Utility\JMLSms.exe","-read:all")
MsgSender = RegRead(HKCU, "\Software\JML\Sms\Sms1", "sender")
MsgBody = RegRead( HKCU,"\Software\JML\Sms\Sms1", "subject")
Think that looks good?
@howdykeith : Yes I think it should work.
StatusTicker and JML...
Hi,
So i incorporated JMLsms.exe and JMLcomm.exe into the StatusTicker.
Works super great!
In future version I will include more of you apps infos... I also will make sure to include the URL to your apps as well.
Thanks much!
Hello,
I'm trying to use JMLContacts.exe to have birthdays on my WAD2 Skin.
I've installed JMLToday and everything worked fine and registry was filled by next 5 birthdays information.
Now I'm trying to update information outside of Titanium/JMLToday and to do it I'm using a mortscript.
Inside script I wrote the following line:
RunWait("\Storage Card\Program Files\UtilsExe\JML\JMLContacts.exe", "-max:3")
Unfortunately it seems not working, at least registry values are not updated. I double checked path and it appears absolutely correct.
More I tried to simply launching JMLContacts.exe directly from TCMD, and I expected it worked with all default values, but of course it didn't... Is my supposition a wrong one?
Meanwhile, thanks a lot to let available for us those little but great tools
@dagosjt :
you must use also -days (0 per default), -birthdays (and /or -anniversaries) parameters
example :
-max:3 -days:365 -birthdays
Ok ? thanks for feedback.
A++
PS : i think i 'll change the default parameters values in a next version...
JMHL said:
@dagosjt :
you must use also -days (0 per default), -birthdays (and /or -anniversaries) parameters
example :
-max:3 -days:365 -birthdays
Ok ? thanks for feedback.
A++
PS : i think i 'll change the default parameters values in a next version...
Click to expand...
Click to collapse
Yes!
Works perfect now I thought days:0 meaning was "all days", sometime it happens in software
HI JMHL
I want to know if JMLMeteo can search for a location based on latitude and longitude
@saeli : not for the moment. Next feature perhaps if more people are interested and if it's easy to hard-coded.
A++
@jmhl: perhaps ypu can use this for location awareness:
forum.xda-developers.com/showthread.php?t=607102
then it could work
Salut
Micha
@Micha : thanks, i look ....
@saeli : ok, weather location based on latitude and longitude certainly in next version.
@micha : thanks for the tips.
A++
JMHL,
Still no HD2 ?
@Zepiii : no. waiting more operator points to change....
A++
@saeli & @all : location based on latitude and longitude in next version of JMLMeteo (in next JMLToday v5.80).
2 ways :
- Sleuth's myLocation Service
- google Latitude
A++
JMHL said:
@saeli & @all : location based on latitude and longitude in next version of JMLMeteo (in next JMLToday v5.80).
2 ways :
- Sleuth's myLocation Service
- google Latitude
A++
Click to expand...
Click to collapse
this is a wery fantastic news
when you think to release new version ?

FolioTNTmod 0.4 - Issues and bugs

This thread should be used for bugreporting and troubleshooting.
FolioTNTmod 0.4 ONLY.
Please make sure to post a detailed description of the issue, under what curcumstances it occures, and which processes are running.
Use the search function to make sure your issue hasn't already been solved before you post.
I've found a way to access Accounts Sync and Keyboard installation.
first, Accounts Sync :
- you must install LauncherPro even if you do not use it.
- On the desktop, add a new shortcut, select "Activities".
- Under "Account Settings and Sync" select "com.android.settings.ManageAccountsSettings.
Well, now you have a shortcut on the desktop to access the sync settings.
Keyboard installation :
After installing your alternative keyboard, copy the APK from /data/app/ to /system/app/
I create a simple script (in Gscript) that mount the file system as read/write , copy the APK, and enable the "SmartKeyboardPro" keyboard (after reboot).
code :
Code:
su
mount -o remount,rw /dev/block/mmcblk0p1 /system
cp /data/app/net.cdeguet.smartkeyboardpro-1.apk /system/app/
**optional**
reboot
**optional**
I was playing with Angry birds and after a reboot the application was corrupted in some way, the icon dissapeared and I had to reinstall, but the configuration was saved.
In anycase I used Angry Birds backup to backup it and after Andexplorer to copy the backup from the internal SD to the external one, to my surprise, the internal one was not present on Andexplorer (but I was able to go trought /mnt/sdcard).
Now I can see it again but there are a lot of files DiskCacheIndexxxxx.tmp, any clues?
julio77 said:
Keyboard installation :
After installing your alternative keyboard, copy the APK from /data/app/ to /system/app/
I create a simple script (in Gscript) that mount the file system as read/write , copy the APK, and enable the "SmartKeyboardPro" keyboard (after reboot).
Click to expand...
Click to collapse
Yeah, thank you for this tweak
Orientation has some problems..
getWindowManager().getDefaultDisplay().getRotation()
should return 0, when Orientation is setted to Landscape...
but it returns Surface.ROTATION_90.
(I'm using 0.4a version)
Davide
This is intended behaviour. It fixes the sensor issues for many applications, as developers didn't prepare their apps for devices with natural orientation set to landscape.
Is this causing any problems for you?
Thank you for your reply.
I'm developing an android game that uses accelerometer to evaluate gravity force's vector. I would like to write portable code (to work on both phones and tablets), so the right code to evaluate gravity (ignoring other forces) should be:
screenRotation = getWindowManager().getDefaultDisplay().getRotation();
[...]
float x;
float y;
float z;
if (screenRotation == Surface.ROTATION_0) // Default portrait
{
x = event.values[0];
y = event.values[1];
} else if (screenRotation == Surface.ROTATION_90) // Default landscape
{
x = -event.values[1];
y = event.values[0];
} else if (screenRotation == Surface.ROTATION_180)
{
x = -event.values[0];
y = -event.values[1];
} else// (screenRotation == Surface.ROTATION_270)
{
x = event.values[1];
y = -event.values[0];
}
z = event.values[2];
gravity.x = -x;
gravity.y = -y;
gravity.z = -z;
This should be the right way to ensure portability.. (it's similar to the Nvidia 'Android Accelerometer Whitepaper''s way),
but it's not working with this patch on Folio (y results in reverse, and rotation sensibility is weird)..
So, to ensure compatibility to games coded only for portrait-native oriented (and, in the same time, ensure correctness to the right written codes), it is not enough to return Surface.ROTATION_90 on landscape orientation, but it should emulate it reversing the values returned by onSensorChanged(SensorEvent event).
In other words,
(EMULATED)event.values[0] = (ORIGINAL)event.values[1]
(EMULATED)event.values[1] = -(ORIGINAL)event.values[0]
The patch should do that. Could you verify that on FolioMod? Maybe something got broken when this was ported to tnt.
Also the Nvidia whitepaper states the following for rotating the values:
90°
x = -v[1]
y = -v[0]
180°
x = -v[0]
y = v[1]
270°
x = v[1]
y = v[0]
Also, please check if you are using the newer API for listning to events (the one that uses SensorEventListener) The legacy Api handles rotations by itself, so you should not handle this in your code.
Yes, I'm using SensorEventListener.
weeds2000 said:
Also the Nvidia whitepaper states the following for rotating the values:
90°
x = -v[1]
y = -v[0]
180°
x = -v[0]
y = v[1]
270°
x = v[1]
y = v[0]
Click to expand...
Click to collapse
This is the canonicalToScreen transform for rotating values,
for screen coordinates, increasing y is down (so I'm using world transform).
Sure that the returned value are (for every rotation angle) these:
(EMULATED)event.values[0] = (ORIGINAL)event.values[1]
(EMULATED)event.values[1] = -(ORIGINAL)event.values[0]
?
To understand if it's a my mistake, I've downloaded a free app from the market, JumpyBall 3D Lite, and I noticed that also in this game tilt behaviour is reversed in one direction (could someone test it on the FolioMod?)..
I've checked the code, and yes in the last version for the fix the accelerometer values are rotated in the correct way:
Code:
switch ( sensor.getType() ) {
// ...
case Sensor.TYPE_ACCELEROMETER: {
if ( legacy == false ) {
valuesOut[0] = valuesIn[1];
valuesOut[1] = -valuesIn[0];
}
break;
}
}
However there was an issue with the first release of the fix, as my portrait testgame was using legacy API, and therefore values were somewhat broken.
Maybe only the first version of the patch is in TNT?
By the way, the code that was modified for the fix has been posted in the kernel and tweaks thread. You should be able to verify that TNT has the correct version of the fix or be able to create a patch for TNT. (Do not try to flash the update, it will most certainly break your framework.jar)
Edit:
JumpyBall 3D is working as expected on FolioMod, therefore i think TNT only has the first revision of the patch included.
Ok, thank you!!
Problems
Thanks for a great ROM...
I have a few problems.. Hope someone can help:
Some applications like NFS:Shift and Grooveshark can't access the internet..
Contacts gives a FC..
I can't seem to sync contacts and calendar from my exchange sync.. I can choose to do so, by entering the sync & accounts through pro launcher, but I can't enable sync, so only email works..
I think that was it for now...
Hope someone can help
***Update***
I got contact and calendar sync to work by installing the contacts application from FolioMod and the Calendar app from The TnT Lite mod from Viewsonic...

[Q] RemoteViews - OnClickListener & SetTextViewText

I have been working on a Home Screen widget for the past two days. The widget's `onUpdate()` method calls a service which fetches RSS information (title and image link) using `XmlPullParser`. These are working properly by printing the value in `LogCat`.
I want to set the text in the `TextView (tv1)` of AppWidget and image link as image to the `ImageView (imv1)` and a `TextView (go11)` clickable to open the browser and goto the link. I put the following in `OnStart()` just to test the SetText.
Code:
RemoteViews rv = new RemoteViews(this.getApplicationContext().getPackageName(),R.layout.main);
// Set the text
rv.setTextViewText(R.id.tv1,"WORKED");
Its not working. Second, I tried to set the image by:
Code:
InputStream is = (InputStream) new URL(imglnk).getContent();
Drawable d = Drawable.createFromStream(is, "src name");
rv.setImageViewResource(R.id.imv1, 0);
Bitmap bitmap = ((BitmapDrawable)d).getBitmap();
rv.setImageViewBitmap(R.id.imv1,bitmap);
Where imglnk is the link to the image. ImageView is not showing the image.
Then I tried to set the OnClick listener to open the browser with google as a test.
Code:
RemoteViews rv1 = new RemoteViews("com.example.axstartup",R.layout.main);
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
PendingIntent pi = PendingIntent.getActivity(context, 0, browserIntent,PendingIntent.FLAG_UPDATE_CURRENT);
rv1.setOnClickPendingIntent(R.id.go11, pi);
Even that is not working. Please help me with this.

Question Windows 11 doesn't remember folder settings

Windows 11 how do I make all files and folders appear as General items and always sorted by date modified and detailed view?
I'm doing the usual ways through file options, but it doesn't work.
In all folders and for some reason it doesn't remember what settings I saved. Is there a way or reg file to make it sealed in the system and that can't be changed?
Chat gpt gave this yet to try ( didn't worked )
Spoiler: Windows Registry Editor Version 5.00
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell]
"FolderType"="NotSpecified"
[HKEY_CURRENT_USER/Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{5C4F28B5-F869-4E84-8E60-F11DB97C5CC7}
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"SortColumn"="prop:System.DateModified"
"SortOrder"="dword:00000001"
Also when win+e it opens home and there are a bunch of things and it slows down, there is a change button to open my computer but it also changes back
When I press saved shortcuts favorites on the left side of the Quick access toolbar, it finds the folder it is in and the view jumps down, and every time I have to scroll up again and again each time I press any favorite.
And when, for example, I need to select a file to upload somewhere, it also does not save the settings and every time hell need yi change the view manually
Please help to sort these problems
Thanks
chat gpt gave this script for PowerShell, not sure if it works
Spoiler: # Specify the view mode and sorting options $viewMode = 1
# Specify the view mode and sorting options
$viewMode = 1 # 1 for Details view
$sortColumn = "System.DateModified"
$sortOrder = 1 # 1 for ascending order, 0 for descending order
# Function to update the view settings for a folder
function UpdateFolderView($folderPath) {
# Path to the desktop.ini file
$desktopIniPath = Join-Path -Path $folderPath -ChildPath "desktop.ini"
# Check if the desktop.ini file exists
if (!(Test-Path -Path $desktopIniPath)) {
# Create the desktop.ini file
New-Item -Path $desktopIniPath -ItemType File | Out-Null
}
# Set the attributes of the desktop.ini file to be hidden and system
(Get-Item -Path $desktopIniPath).Attributes = 'Hidden', 'System'
# Update the content of the desktop.ini file
@"
[ViewState]
Mode=$viewMode
Vid=$sortColumn
Sort=$sortOrder
"@ | Out-File -FilePath $desktopIniPath -Encoding ASCII
}
# Specify the drive letters to target
$driveLetters = 'C', 'F'
# Loop through each drive
foreach ($driveLetter in $driveLetters) {
$drivePath = "$($driveLetter):\"
# Get all folders, including hidden ones, on the drive
$folders = Get-ChildItem -Path $drivePath -Directory -Recurse -Force -ErrorAction SilentlyContinue
# Loop through each folder and update the view settings
foreach ($folder in $folders) {
$folderPath = $folder.FullName
try {
UpdateFolderView -folderPath $folderPath
} catch [System.UnauthorizedAccessException] {
Write-Warning "Skipping folder: $folderPath. Access denied."
} catch {
Write-Warning "An error occurred while processing folder: $folderPath."
}
}
}
Best Windows 11 Folder Settings [Tips & Tricks]
If you wish to keep your PC folder organized, you must check out these Windows 11 folder settings tips and tricks.
windowsreport.com

Categories

Resources