Discover the powerful features of HeadSpin's APIs in our on-demand webinar. Learn how to streamline application management by leveraging HeadSpin's platform for seamless uploading, installation, and uninstallation of applications. Whether you aim to boost app performance or simplify operations, this session offers the insights and tools necessary to optimize your application management processes using HeadSpin's advanced API solutions. Don't miss out on transforming your application management strategy for operational excellence.
To know more about HeadSpin, visit: https://www.headspin.io/
To know more about HeadSpin, visit: https://www.headspin.io/
Category
🤖
TechTranscript
00:00Hi everyone. So today I'll be taking a webinar on how to use Headspin APIs to manage applications.
00:07We'll be more or less focusing on mobile devices first but in the meantime I'll be telling you a
00:12bit more bit on how an application works. It's a high-level webinar so if you have any questions
00:18please ask in the Q&A section in Zoom and let's get started. So the agenda before I start. So my
00:28name is Kristi and I'm a part of the Headspin sales engineering team. I work with any clients
00:35that want that has trouble accessing the platform or if they want to integrate their frameworks to
00:41our platform and I'll give you a quick introduction on I'll give you a quick agenda on what we're
00:48doing in the webinar. So I'll be introducing Headspin. I'll be talking a bit of what an
00:54application is and what are the different type of applications that we work with. I was provisioning
00:59using Headspin APIs to upload, install and even uninstall applications on the platform
01:04and using Headspin's apping capabilities to do the same. Now a quick introduction on what
01:11Headspin does. So we are a digital experience AI platform. We deal with real devices and we have
01:17cloud devices all across the world. So these are the four major pillars of Headspin. One is global
01:23device infrastructure wherein we have remote devices all across the world, be it India,
01:28Indonesia, Malaysia, South Korea, you name it, we have our presence in around 100 plus locations
01:33worldwide. And the second pillar is test automation in any place. We have a dedicated
01:40network of hosts in which you can run any of your automation scripts, be it Appian based or even
01:47say low-code solutions like Tosca, Leapworks and XLQ on the remote devices that we have.
01:52You can even use your CI-CD pipelines to run the automation scripts. The third pillar would be
01:58performance, quality of experience and machine learning. So once you run your scripts on the
02:04devices that we have, we give you session reports from those particular scripts. So if it's
02:10an Appian script that you're running, you can get a device level details on networking, pay calls
02:14captured and plotted as a report which has the video of the recording itself and some device level
02:21information like the net CPU memory used or even the battery drain. And even the fourth pillar would
02:26be insights to those actions. Now once you record those sessions, we can give you insights into the
02:33recorded session reports. So for example, if there's loading animations on say the desk case
02:39that you run, so you can highlight those particular regions where there are loading animations,
02:44then zoom into those locations and see what could have caused it. So is it because
02:50the memory usage was a bit too high? Was there a lot of open TCP connections at that time?
02:56So we give you those insights as a form of issue cards. This is the physical hardware which lets
03:03us connect the remote devices to our platform. What you see on the left hand side is called as
03:09the Hitwin P-Box or a proxy box. This has multiple hosts in it. It can be a combination of Linux and
03:15Mac Minis together which connects Android or iOS devices. And what you see underneath this
03:21underneath it is an AV box setup. So in cases where you'd want to plug in say an OTT device like
03:28a Fire Stick, an Android TV or even an Apple TV, you can use that to get that on the Hitwin UI.
03:33And what you see on the right hand side is the actual UI wherein you can interact with the device.
03:38So here you can see the device in which the device that you can interact with. Now on the right hand
03:43side you can see some options that you can use. Now we'll talk about what an application is and
03:49why you need it in your daily life. So here the definition of an application is a software or a
03:55piece of code that does a certain function. Nowadays it can pretty much do most functions.
04:01So everyone must be using a laptop or say an Android or iOS device. And in those devices
04:08when you want to say perform a certain task like if you'd want to watch a video you'd be more or
04:13less using the YouTube application. And if it's a web-based application you'd just go to youtube.com
04:19and then stream the application that you want. Now there are different platforms in which an
04:25application can be used. Say for mobile devices you can use an iOS or an Android device. There
04:31are additional mobile devices as well but for now at least we'll be talking about the iOS and Android.
04:37You can use web browsers. So say you'd want to view an application but you don't you can't really
04:44install it on any of your devices. You can directly have the web view of the same application. I think
04:49more or less most of the application has its web view counterpart. And even some applications like
04:56an example a good example is Swiggy Instamart. You can have it opened in your browser as well
05:02and I think there's actually a web-based version for Android devices called Instamart Lite.
05:07So that's another example. Now desktop computers also have applicants in them. It can be a Mac
05:13macOS using a dmg file or maybe a Windows machine that uses a .txt file to install the application.
05:19Now installing the application majorly there's two methods. One is sideloading it. So you can either
05:26get the file for that particular platform and get it installed directly on the device by uploading
05:32it to the storage of the device and then installing it or you can download it directly from a reputed
05:37source. For Android it could be the Android Play Store and for iOS it could be the App Store.
05:45Now there are different types of files depending on the platform that you're using. So the major
05:51ones that we are going to talk about is Android and iOS. Android uses the standard file types APK
05:57and for iOS it's IPA files. Now Android devices can download APK files directly from the Play Store
06:05like I said previously or sideload it either by installing it by getting the APK file downloaded
06:10from any websites. There's a lot of websites that you can download from and if you're a developer
06:15you must have even heard about an app center in which you can get the builds of your application
06:22downloaded. For iOS it's IPA files. You wouldn't you must unless you're a developer you must
06:28must have even heard about IPA files because it's very hard it's a bit complex to install an IPA
06:35file directly unlike Android which you can use open source third-party tools to get it installed.
06:41Now talking about variations of the APK file itself. Now for Android there are different
06:48file types that you can install. One is the standard one that's APK. Next one is XAPK files.
06:55If you've ever downloaded a game or if you ever sideloaded a game that you download from a
06:59third-party site website you must have seen there are two files that gets downloaded. One is APK
07:06file itself and another one is called .obb file. An obb file would contain a lot of the
07:16extra details of the application. An example if you're downloading say a large game like
07:22COD mobile or say PUBG it would have all of its background data or many of its animations
07:29or soundtracks in the obb file and the basic data as the APK file. Now the XAP file combines both of
07:35them into just one file. It will be a very large file which you can install on the device and you
07:40can even have APKS files. It's not APKs it's APKS which is basically split APK files. So APKS files
07:48are basically files that you get when you say build your application using Android Studio and
07:56you convert the developer file that is the AAB file into an APK file. It gives you a split APK
08:02file so that you can install it on various types of devices. Now talking about that that's AAB
08:08files are basically a segue to our next topic that's developer file types. AAB files are app bundles
08:16that can be that are created when you start building your application using Android Studio
08:21for Android and APP files are the counterparts to iOS when you try to say build an application
08:28using Xcode. So one if you want to install an AAB file or use say Android Studio to develop
08:34your application you would get the AAB file as the output and APP would be the same for iOS devices.
08:42Now again I've talked about how it's a bit more complex to install a side load and
08:49IP file right. So why that is is because Apple has another you'd have to what we call provision
08:58your IP file to get it installed on one of the one of your iPhones that's where iOS provisioning
09:05comes in. Now the purpose of provisioning or why it's a bit more complex is because
09:11it's a lot more secure. So when you have a debug build or say a QA build that has that
09:17that must only be installed on say certain devices then you would want to use provisioning
09:24that is provisioning means you would have to install a certificate on or a provision certificate
09:30on the device that you want to test out and then you would have to add the UDID or the device ID
09:35of the device that you want to install the file on in your developer account. So whenever you build
09:41an application or an IP or an iOS application you would have to have an Apple developer account
09:47first then you have to add the UDID of the device that you want to install on in that developer
09:53account and then build your application. Once you have that you can install the IP file on the
09:58on any of the devices which you've already added and get the app running. Now the importance is
10:05basically so that the app itself gets installed only on the intended device. Okay I'll answer
10:12the questions at the very end but if you do have any questions while I'm giving the webinar please
10:19you can ask away in the Q&A section. Now using now let's get to the API parts. Using Headspin APIs to
10:27upload, install or even uninstall applications. These are the basic APIs but we we do have a lot
10:33more APIs as well. Now this is the Headspin UI and you can actually open up any device like say
10:41I'll just test the installation of application using by going on the S22 Galaxy S22 device
10:47that's in Bangalore. You get a lot of details of the device like the device ID, the host name, you can
10:53even have a physical SIM card attached to it. Now this particular device is connected to Wi-Fi and it's
10:58running on Android version 12. You can boot up the device just by clicking the start button over here
11:04and once the device boots up it's just like any normal Android device. You can do swipes and
11:08clicks navigate to the UI and you can even open up the Play Store to install the application
11:12directly over here. But we'll be talking about installing the application using an API.
11:17Before I start you can see these are the default applications on the device and if I want to upload
11:25say a speedtest application I have already downloaded the file in my local directory. I'll
11:31just go to the documentation section over here. This is the app management section so this has
11:36all of the APIs that you'd want to use to upload, install, uninstall or even manage the upload
11:42applications. The first step to install an application on this particular device is to upload
11:48it to our host. Now when I click on general and go to upload an app a link over here you can see
11:56we have the upload API. This has the authorization token and you can also see the application that I'm
12:02trying to upload to the host. So what I have to do is copy this example and either you can use
12:10postman if you're comfortable with postman. All you have to do is just click on import
12:18add the API over here go to authorization select pair a token and in the body you can just click on
12:27the file that you want. In this case it's speedtest.apk file and I'll just click on send.
12:33So once it's uploaded you will get an app id as a response. It's an alpha numerical key that you can
12:39use another API to install it. It takes around a minute so here this is the app id. So I'll just
12:46copy this paste here. Now to install say the uploaded application on any one of the devices
13:03in this case that's 22 you can go to manage apps by app id. You can see we have installed an app on
13:10on a device by the app id method. You can also use metadata as well. Metadata is just additional
13:16information that you can give the uploaded application. So say you have different builds
13:23of your application and you'd want to separate the devices based on its build number. So what
13:30you can do is you can just go to upload an app and the next one and set the metadata this part
13:37you can see you can give the minus f parameter and have metadata equal to a key value wherein
13:43the key can be build number region and depending on what your use case is and give the value here.
13:49You can use that to install the application. Now in our case we will be using the app id.
13:54Now here you can see you can install the application using this API which is the install
14:00API. So I can either copy this paste into the postman. If you're using macOS or Linux you can
14:07directly run it from a terminal as well. So I've copied the app id. So here you can see this
14:14in the curly brackets this app id setup and paste this here.
14:32Get the app id from here.
14:44And then at the very end you can see there's another alphanumeric key which is the device
14:49address or the device id. So I can remove the one that's over here and then I can pick the one
14:58on this device. So you can see the serial over here for easier access you can just go to devices
15:04and just select the device id from here as well. So once you have that all I have to do is just
15:10paste it here click enter and again in a few seconds you will see that the apk file would be
15:17installed on the device with a variant. It doesn't take that long.
15:34And if you want to do the same thing using postman with the same method
15:39you just copy the same api from here call import paste it
15:48organization select wearer token over here and then you change the values from here.
16:00Copy the app id from here
16:03paste it
16:10and then go to the device over here it's already installed copy the serial
16:20contains the app path right over here. So this is already installed and you can
16:25see the response over here so performance stream installed and the value success. So you can see
16:31the apk was installed I can open it up and I can start using it pretty straightforward.
16:39Now to uninstall it again it's the easiest way is to just use the uninstall app and install part
16:46over here you just have to change install to uninstall that's it. So I already have install
16:52setup right what I can do is you just change it by adding a un just before this
17:00install and if I go to the device right here
17:08you can see the app is uninstalled very straightforward. Now we have even we have a
17:13repository as well so whenever an application is uploaded to our host you get app ideas as
17:19a sponsor right. So what you can do is you can list out all of those applications by going to
17:24the very top and you can see list uploaded apk apps and their metadata. If you run this command
17:32in postman for example it will give you the list of application I just import it
17:39and you can even set a limit as well otherwise you might see a lot of applications I'll just
17:45limit it to three for now
17:52and click on submit this gives you a lot of information of the product like the identifier
17:59application name the file type the minimum OS that it wants and some other additional details.
18:05So this is on how you can use applications or upload applications. Next just like using an
18:14API you can even use Headspin's apping capabilities as well. So that's where you can use say Appian
18:21to again install the applications on the devices and you can even re-sign the application if you
18:26want on say an iOS device. To do that once you have the app id what you can do is you can go to
18:32app capability section over here yeah if I just type in app.id you can see Headspin app id as a
18:41capability. Now what you can do is you can copy this into any of your Appian base scripts and give
18:48the app id as a key value pair and then run that Appian script on any one of the devices that we
18:56have and it will install the application. That's it it's that easy so you can have you can have
19:02one script written and you can basically run it on any one of the devices that we have get the app
19:07installed and that's it you're good to go. You can even uninstall any applications as well
19:13by using another capability which is called Headspin remove app packages. So say you're
19:20trying to run your automation script you must have if the whole user flow is just to say
19:27use cold start or do a cold launch of the application instead of having to use any other
19:34driver that basically needs you to start the actual test itself. What you can do is you can
19:40add remove app packages over here so even before the driver is being initiated it removes the app
19:45packages you can even set a list of packages over here to get it uninstalled and yeah you can even
19:52install multiple application at the same time by using the otherapps.ids as well that's
20:00another method that you can use. So there must be another there should be a question regarding
20:09could we use say the Headspin's default whether that's Headspin app. For Headspin you have to
20:17always use app id just because we have a dedicated host and we upload those files to the host and
20:24then you use the app ids itself as like a path to the file and that's how we install it but
20:31normally the app function doesn't work that's why we have app.id
20:36so yeah it's a it was a very short webinar any doubts questions or if you'd want to see
20:44more apis regarding the app. I mean I can show you that as well yeah I can see there's
20:50three questions already set up is it possible to convert .aab file to a .apk file
20:58so yes you can so how yeah so you have a tool called as bundle tools that you can use if you
21:05have an aab file with you and you don't have the actual android studio with you to convert it but
21:12the easiest way is to just build your application from the android studio itself and get it as an
21:18.apk file. Next is how to execute adb shell commands on any of the spinconfig devices using
21:26python app in script. So we actually have a device api over here so here in android device api
21:37let's see we can send adb commands from here so you can use this so you can write a function
21:44like a python function over here and get this executed wherein say this is an example so
21:50this is a command to list the packages of the installed device if I just run it right now
21:56it'll give you the list of packages of the device r5cr I think this is the same one
22:02yeah it's a different device but yeah this is a list of packages installed on that device
22:07next is can files be installed directly through adb oh yeah you can do that so
22:14this command is majorly to send shell commands if you directly want to run adb commands what
22:20you can do is you can use six pins uh cli tool it's a command line interface tool so here if
22:27you put two sections in the ui you can see we have something else in multi book just by copying
22:32just by copying this command I'll just get this out pasting it say in my terminal
22:40I can get the remote device access locally as well so I have this in a few in a few seconds
22:47you can see that the device is stabbed uh you can see the device connected I run adb device
22:52for example you can see the device listed another thing that I can do is I can just go to
22:58see
23:06over here if I want to install the file I can just type in adb
23:11install and I can do the same installation through adb as well
23:20okay you can see it says success and if I go back to the device the app is back
23:24third-party app stores usable with your platform yes yes they are so if you if there is an app
23:30so that you'd want to download you can either download it from the play store uh over here
23:35oh sorry not the play store you can just search for the app store from say the browser so I just
23:42go to world.com and search for app stores so maybe a bkp or if you'd want to install that
24:05you can get that you can get this place to this app store
24:09download and install the device and then start using that if you don't
24:12want to use apps and you can do that as well
24:17any other questions
24:25can you run app under debug mode yes you can so that's where the cli tool again comes in
24:31so you can have it run in debug mode and then connect it to android studio for instance to
24:36actually see the changes um so this let me see if I can run the flutter application so
24:50yeah so an example would be if I if you're say testing out a flutter app so you can have the
24:56cli connected directly and get the app installed on the device using flutter run and then any
25:02changes that you make you can just hit refresh and it will show up on the connected device you
25:07can do that yes ios is supported so any ios based devices say for example I have an iphone xr over
25:19here if I want to if I want to upload the ip file over here all I have to do is just go to apps
25:26click on browse and select the ip file of my choice and get it uploaded and installed the
25:31provisioning is taken care of by our api as well so just like how I've explained why you
25:37needed an ios provisioning ios provisioning done on an ip file you can basically get that done
25:44through us as well so we have an api that provisions the ip file and gets it installed
25:49on the device that it can only be done as long as you have the ip file as a separate file
25:55you can integrate uft tools it's similar to how you that I've connected the cli tool
26:02so uft requires you to have a physical connection to your laptop so in a similar manner you can get
26:09that connection through the cli tool so once you have the cli enabled and connected to your laptop
26:15you can get the device so that I think we have a document we have documentation on that as well
26:20anything else
26:36any questions are okay with me
26:50Okay, I'll just wait for a couple more seconds and we can see if there's any more questions.
26:58And I in the meantime, I can actually show you a bit more of some a bit more app management
27:03in base over here.
27:11So here you can actually select an application based on metadata.
27:15So like how you can install or upload an app using metadata in use certain selectors over
27:21here.
27:22So if you want to pick some AP IP files based on its app type, the app name, or the app
27:29identifier itself, you can add that to the search list as keys.
27:33So this, this gives you the keys that you can use to actually search for a type of application.
27:40So you have a build commit.
27:43So this is the commit hash code that you can use the timestamp, build type, file size.
27:49So if you say uploaded 10 different kinds of application, you just want to get a file
27:54type of an application or search for a file type, search for an application based on its
27:59file size, you can do that.
28:00So you can even use OS minimum.
28:03So say you're testing to build up an application and you have an Android nine or 10 device.
28:13So you've uploaded previous builds, but you'd want to find that build based on its OS type,
28:18like the minimum OS version.
28:19You can do that using OS minimum.
28:21So these are some of the additional tools.
28:23So you can even combine multiple keys as well to find the exact application that you'd want
28:29to say.
28:30It should be an iOS application and it should work on say devices that's lower than iOS
28:3911.
28:40You can combine it with using plus.
28:43Okay.
28:44Question.
28:45Can you show how Headspin can be accessed to start from login to access the device or
28:50manual access?
28:51Okay.
28:52To actually get to use Headspin, you will first have to sign up to our platform.
28:58I think if you, I think there is a help section on our video here where you can just contact
29:05support and give your email address and then we can have like a, we can give you access
29:12to say some devices for you to use, but majorly you would have to sign up to the platform
29:17to access it.
29:18Once you sign up, you can see the device list in the device section.
29:22And if you'd want to say, see the devices based on its location, you can just click
29:26on who's over here and that's how you can set up any device, but want to set up a device
29:31in London.
29:32I just get London over here and you can see the devices listed.
29:36Okay.
29:37Any more questions?
29:40Yes.
29:41The recordings would be available, yes, no problem at all.
30:05Okay.
30:06Okay.
30:07If there aren't any more questions, we can end this early.
30:11It was a short, high level webinar on how we can use Headspin to overcome any app management
30:18issues that you might have.
30:20So being a cloud platform, you can pretty much manage and even run test cases on a platform
30:26very easily.
30:27So these are some of the APIs that you can use.
30:30So thank you all for joining.
30:32Hope you have a wonderful day.
30:34Bye.