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 



Tuesday, July 4, 2023

IDEA and Git - have two or more authors on a commit

 A trick i just realized... I am working on a java project with a fellow CS Student. my partner and I sometimes use CodeTogether (an IDEA extension) to pair program remotely (or even in person)... a major issue with it (for the project), is that it is saved on the host's computer and only shows that they did the commit... a solution is in the git commit message, add 

Co-authored by, followed by the other person's name or email used, and select the correct recommendation 

and it should also find and give you the option to auo-complete their name and email... in github it shows up as both people did the commit together!

This is what it looks like after pushing the code: 



This comes in handy for pair programming, code reviews, and job interviews. 


CodeTogether has a limited free version, the application can let the person you share with work on the project at the same time via a web-interface or via IDEA (in the current window, or even a new window). 



Sunday, August 14, 2022

How to change your DNS Server to Cloudflare and Google's and more tips and tricks for windows users!

Here is a guide for how to check your DNS settings and configurations for sites you own or want to visit. Some of these tips are for beginners but there are plenty of new things even for advanced users to learn! 

The terminal/command prompt commands I will be using in the post are only relevant to windows users... If you have a Mac or Linux they will not work... 

The connected world

1) How to open command prompt and some cool commands

Win + R -> type CMD -> click Ok or press Enter 

Command choices: 

ipconfig - generic stats about your network adapters and IP addresses

ipconfig /all - more detailed view

getmac - returns the MAC address of all the devices on your computer 

2) Run WHOIS locally

whois - want to see who owns a website, when it expires and who the domain registrar is? On windows, this doesn't come built into the operation system but it is a package which you can add do do the check. You can add the path location to your environment variables which allows you to run it in any directory via CMD. 

setx whois "C:\enter your directory here"

in my case:

setx whois "C:\Program Files\whois"

where whois is the folder containing the EXE
where whois is the folder containing the EXE

Now you can close all your command prompt windows... then re-open one and type: 
whois -v example.com to see all the info on that website (another optional flag is -nobanner to remove some more annoying text)

Alternatively, you can perform a search for whois in your favorite search engine and there are 3rd party websites which provide a similar service. I prefer using the windows package as it's faster and there are no ads or bloatware unlike on those websites. 

3) Get a new IP address 

Exercise Caution with these ones: 

ipconfig /release - releases your DHCP leased IP address... you will lose internet after running this

ipconfig /renew - gets you a new IP address (run this immediately after the release command finishes)

4) Find an IP address from a domain name:

Open CMD and write: ping example.com 

That command also shows you server response time and packet loss...This is a great tool to check and verify if you can access a website or not. 

Command Flags: The syntax is usually as follows "command argument -flag1 -flag2"

Flags are optional additions to the command argument which enable different modes, you can use then in succession just make sure to include a space between them. If you are unsure which flag does what, you can type "command /?", .. then it will fill the screen with all types of flags and what they do!

command /?"
Just an example

If you want to check continuously, you can add a -t and it will go on forever... till you hit Ctrl + C or click the X button. 

There are other flags such as -a which is supposed to give you the address of the server, you can also force it to give you an IPV4 address with -4 or -6 to force a IPV6 address

5) Purge DNS Cache Globally

Another powerful tool is purge cache, this let's you submit a request to these DNS services to tell them to refresh their database for the specific domain that you want. 

If it isn't purged, the record should usually update within 72 hours but usually occurs much faster. Essentially, one DNS server finds out the new IP address, then it gets passed on to other level servers, etc. till it is all updated. By "purging" the cache yourself, it can speed up certain parts of the process for customers who are using either Cloudflare (1.1.1.1 or 1.0.0.1) as a DNS provider or Google (8.8.8.8 or 8.8.4.4)

https://dns.google/cache (also for google)

You want to select the CNAME record (this is what ties the domain to a server via another name), and the A record (ties the name to an IP address). This is meant for domain admins usually when they change a DNS entry to switch servers to notify and have the new IP address ready. 

6) Flush your local DNS cache (on your computer)

ipconfig /flushdns this command flushes/erases the cache of DNS entries that you had... this comes in handy if a website that you want to access changed IP addresses and was unreachable. 
Now, when you make a request with your browser, it will pull the results from scratch. 


7) Nameserver lookup (DNS search)

nslookup example.com (Name Server Lookup)

This is a good way to check if your DNS record is working and if a website exists or not. 

This is a good way to check if your DNS record is working and if a website exists or not.

8) See hops via tracert 

Trace route is a cool command which lets you see how many hops and what servers your request passes through till it reaches it's destination. 

Trace route is a cool command which lets you see how many hops and what servers your request passes through till it reaches it's destination.

type tracert example.com (and you can add optional flags too!), now hit enter and wait for the command to begin. Depending on your local internet connection it could take a while to reach the destination server. 




9) Change your Windows DNS Servers and set a static IP


If you use your ISP's DNS they can easily track and control which websites you can visit... 

I like to use cloudflare as primary and google as backup... yes, you can mix and match your primary DNS server and secondary

If the request to primary fails, it will go to secondary... and by having 2 different and not connected sources, the chance of both of them failing decrease by a big factor

My Primary DNS: 1.1.1.2 (cloudflare with malware blocking)

My Secondary/Alternative DNS 8.8.8.8 (google's dns resolver)


Hot DNS 213.57.22.5 and 213.57.2.5 (My local ISP's DNS servers)

Win + R  -> ncpa.cpl -> now find your wifi or ethernet network -> right click on it -> properties -> enter admin credentials -> Internet Protocol Version 4 -> properties -> now you can change to a static IP address, change your gateway, and subnet mask. In addition to picking new DNS servers! 


change your gateway, and subnet mask. In addition to picking new DNS servers!

DNS Server menu



For more advanced users, you can have more than 2 DNS servers and you can also set additional configurations... If you are not familiar with this, it is best not mess around with these settings. 

Add more DNS Servers