Search This Blog

Disclosure

Everything Tech Review is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to products on Amazon.com. Amazon and the Amazon logo are trademarks of Amazon.com, Inc, or its affiliates.

Friday, July 21, 2023

Getting app the app IDs for my watch active 2 with tizen and how to launch an app easily

 

Get app package names and open applications dynamically on a Tizen Wearable device!


Developing apps for Tizen devices can be annoying... All of the samsung smart watches up to the Galaxy Watch 4 all run on Tizen OS... Newer devices thankfully run on Android Wear... This guide is for the older wearable devices. 


Assuming you have debugging and developer options enabled... and installed the Tizen Device Manager.


You can click on your device


and click "open shell"

now you have the SDB on the device...

type pkginfo --listapp 
alternatively, this command will also list the packages pkgcmd -l

If you do not want to go via the GUI, open command prompt (via CMD or terminal) and run sdb connect "IP of your device" (without the quotes. then write sdb shell, and now you can also type whatever commands you like 


and now i have a lot of info on the apps installed!


I put the list on my github page, if you want to check it out as well: https://gist.github.com/avipars/bf4ebf3efa1bcceb77025b8b9159a6df


Here is some C# code that you can use to launch any package programmatically: 


        async Task openApp(string packagename)

        {

            Tizen.Applications.AppControl myAppControl = new Tizen.Applications.AppControl();

            myAppControl.ApplicationId = packagename;

            try

            {

                await Task.Run(() => Tizen.Applications.AppControl.SendLaunchRequest(myAppControl));


            }

            catch(Exception e)

            {

                status.Text = "Failed to launch: " + e.ToString();


           

            }

        }


and you enter the package name as a string... you will need to enable this privledge though to actually use this 

"appmanager.launch" in tizen manifest to actually launch another app or even the settings panel 



No comments:

Post a Comment

Thank you for posting a comment, it will be reviewed and then posted shortly.