Category Page

Category:

pCloudy Plugin for Cordova

April 25th, 2018 by

Cordova

 

Cordova is an open source mobile app development framework which helps build cross-platform mobile applications that are highly scalable and agile. The use of common scripting languages such as CSS, HTML and JavaScript assists in developing a simple and organized Cordova framework, which makes it a popular framework among app developers.

 

Cordova Archtecture

 

Advantages

 

Let’s have a look at some of the advantages of creating apps on Cordova :

 

  • It is a hybrid script framework which uses standard web API’s for all well known operating platforms.
  • The Cordova application developers only need to know web development using HTML5, CSS3 and JavaScript.Cordova takes over the rest of the work to be done.
  • Using Cordova, a developer can create applications for operating systems like iOS, Android, BlackBerry and Windows Phone. The Cordova developer need not be an expert of either of the above mentioned operating system.
  • Cordova has edge over the others simply due to the coverage of the framework.

 

The Cordova project consists of three main things—a command line tool, access to hardware features, and the ability to support future features.

 

Need for Cordova plugin in pCloudy

 

pCloudy being a unified mobile app testing platform is used both by developers and testers. pCloudy offers DeviceTunnel feature for developers to connect to a real device on cloud and use the device as if it’s connected to their local USB. Currently the DeviceTunnel is possible through Android Studio/Eclipse and XCode plugins. Although developers could create builds perfectly using any of the IDEs on the platform, Cordova developers looked for a seamless way of creating apps on a command line tool.

 

As mentioned earlier, Cordova is a popular open source app development framework among developers and there was a need of command line DeviceTunnel Interface to pCloudy so that developers could build their Android or iOS apps and put it to test on a real device on pCloudy. Now, pCloudy real devices on cloud can be accessed by running few commands on the command line interface.

 

Let’s see how this works with Cordova.

 

Note: pCloudy command Line DeviceTunnel Interface is only available for Android devices on Public cloud. It is available for both Android and iOS on private and on-premise cloud.

 

Pre-requisites

 

  • JDK 8 and above.
  • android-sdk latest version.

 

Jar download path

 

http://pcloudy-content-distribution.s3.amazonaws.com/index.html?prefix=Android%20Device%20Tunnel/

 

This will be a one-time activity and need not be repeated again.

 

Steps to Run the Jar

 

Step 1: Run the DeviceTunnel jar by passing the cloud url, user name and api key

 

Example: java –jar pCloudy_DeviceTunnel.jar https://device.pcloudy.com test@pcloudy.com skdflj4tlko46lsa

 

Note: Mention the device tunnel jar path where you store the downloaded pCloudyDeviceTunnel.jar

 

Example: Here, the jar is saved in desktop so the path would be like

 

java –jar /Desktop/pCloudy_DeviceTunnel.jar https://device.pcloudy.com test@pcloudy.com skdflj4tlko46lsa

 

Cordova Plugins

 

Step 2: It will display a list of available devices in that cloud. Select any one device by mentioning the device number and press enter.

 

selct-any-device-press-enter

 

samsung grand quattro

 

Step 3: Enter the duration (in minutes) for which you want to book the device, then press enter.

 

enter id

 

Step 4: Selected device gets connected to your system.

 

get connected to your system

 

Step 5: Open another terminal and check if the device is connected or not

 

open another terminal

 

If the device list shows as unauthorized then copy the url displayed by the jar and paste it in the browser.

 

Device List

 

connect to a device

 

Step 6: Click on ok option on the device and check device list again in terminal.

 

Ok Option

 

Ok Option

 

Now device is connected to your system. You can use this device like a local device.

 

Now use the connected device in Cordova app Debugging. Build the cordova app for android.

 

run cordova android

 

Step 7: Cordova build process

 

cordova build process

 

Deploying to device

 

Step 8: After the successful build, check if the app gets installed on pcloudy device which you had connected to your system.

 

After Successful Build

 

Cordova app is installed on pcloudy device.

 

Step 9: You can debug this through chrome debugger.

 

Chrome Debugger

 

DevTools

 

pcloudy-devtools

 

Note: If you want to exit from the device tunnel jar, please type ‘EXIT/exit’.

 

exit

 

Conclusion

No matter if you are a developer or a tester, just sign up on pCloudy to make the most of your app testing.

App Testing during your Dev Cycle – Developer Tool to Access Real Devices on Cloud

June 7th, 2017 by

App Testing

If recent past has been any indication, then it is a certainty there are growing expectations from Testers and Developers alike, to take quality head on, as a joint feature. More so in the Mobile App Testing projects where changes are required faster than ever.

 

As part of DevOps practices, it’s has become imperative for developers to run as many tests as possible with every code check-in. These tests could be automated functional, API or Unit Tests. Some of the popular tools to used by Developers to create their tests are Espresso, XCTest and Appium.

 

Following are some the Challenges faced by developers:

  • Developers need access of right set of devices across different versions to be able to run their tests.
  • Debugging capability on those devices so that they can fix issues quickly.
  • Access to a specific model of devices to debug production issues.

Try taking a look at a typical developer’s cubicle and you will see a series of mobile devices connected with several long USB cables running into computers. It does get frustrating to see others furiously plugging USB cables in and out of the mobile devices for App Testing on various devices.

 

Many of the organizations are shifting to device cloud to provide their teams access of right Mobile Devices. Device cloud are solving the need of test teams but provide limited debugging capabilities and hence not preferred by Developers.

 

To directly address need of Developers, pCloudy recently introduced DeviceTunnel, which fully allows developers to take complete control of the device in cloud. This unique solution provides access of cloud devices through the Android Studio or Eclipse IDE and the command line tool installed in your computer.

 

It works as if Device is connected directly to your computer through a USB cable. From the point of view of tools like Android Studio or Eclipse, a cloud-based device appears physically attached. In reality, the Device Tunnel communicates with pCloudy’s servers over Internet.

 

App Testing

Access devices directly from your terminal

 

Once a connection is established, the developers can perform the following actions on these devices:

  • Issuing a range of ADB commands for debugging, shell creations, port forwarding, and viewing general information about any cloud-based Android device
  • Copying and pushing files to connected cloud-based devices
  • Installing and uninstalling applications
  • Debugging apps during development or testing by adding breakpoints, inspecting variables, analyzing run-time metrics to optimize your app and more
  • Run their tests on the device directly from their IDE

To know more on how to connect any device on pCloudy using Device Tunnel Click Here.

It is undeniable that developers and testers need quicker access to diverse devices for the brisk evaluation of app and debugging. Device Tunnel enables both sets of engineers to instantly connect to any device hosted on cloud and run faster debug sessions and thereby, maximize the quality of their build cycles.

Device Tunnel

February 9th, 2017 by

Device Tunnel

 

In the age of mobile apps, a typical developer’s cubicle can be imagined as place where a series of mobile devices are connected with several long USB cables that run into computers. While some developers furiously keep debugging their apps on their computers, there will be others who frequently keep plugging USB cables in and out of the mobile devices to test their apps on various devices.

 

That makes some of us wonder, doesn’t it? What’s the connection between mobile app developers and USB cables?

 

Well, when a developer connects a device to a computer, he will instinctively enable the ‘USB Debugging mode’. When the ‘USB Debugging Mode’ is enabled on an Android device, it opens up a bridge between the Android device and the computer. This bridge grants him a level of access from your computer to your device. What kind of access? This level of access that USB Debugging Mode grants is important when he needs system-level clearance, such as when coding or debugging an app. This mode, also called the Developer Mode, allows newly programmed apps to be copied via USB to the device for testing. Depending on the OS version and the installed utilities, the mode must be turned on to let developers gain access of the device. One such common utility is ADB.

 

What is ADB?

 

One of the most commonly used abbreviations in Android blogs and forums is “adb”. So, what is “adb”?

 

ADB, Android Debug Bridge, is a command-line utility included with Google’s Android SDK. It provides a wide variety of functions for managing your device. As stated in the Android developer site — “Android Debug Bridge (adb) is a versatile tool that lets you manage the state of an emulator instance or Android-powered device.” In simple words, ‘adb’ is a “bridge” through which developers can connect to an Android emulator or a device from a computer to resolve bugs in their applications. The bridge can be accessed via a command line interface from a computer, where the Android SDK is installed. This is done by connecting a device that runs the software through a PC, and feeding it terminal commands. ADB lets you modify your device (or device’s software) via a PC command line.

 

Using ADB with A locally connected devices

 

A simple client-server setup using your USB cable will help you establish an adb connection from a computer to an android device. Once this connection is established, you can send adb commands from your computer via USB to control your android device. Using ADB commands you can move content to and from your phone, install an uninstall apps, back-up and restore your software, run shell commands, run automation scripts and more.

 

But, it certainly raises questions like these:

 

  • We are moving to cloud-based devices, how will we be able to use adb connection with the devices on cloud?
  • Do I have to switch to local devices to if I have to debug my app?
  • Does this mean I cannot use adb bridge when I’m using devices on cloud?

 

Well, the answer is you can establish adb connection with cloud-based devices as well, and it is a much easier process compared to connecting your devices locally.

 

Using ADB with A Remotely connected device

 

Accessing ADB through pCloudy platform – Device Tunnel

 

pCloudy has introduced Device Tunnel, a new add-on to our real mobile device cloud. With Device Tunnel, you can connect and take full control of any Android device using Android Debug Bridge. It provides access to the cloud-based devices through the Android Studio or Eclipse IDE and the command-line tool that’s installed on your computer. What’s more? Many test automation frameworks and developer tools used for evaluation of the app and debugging can hold on to cloud-based devices as if locally connected by USB. For such tools, Device Tunnel acts as a “USB cable” connecting cloud-based device(s) to a local laptop or server. From the point of view of such tools, a cloud-based device appears physically attached. In reality, the Device Tunnel communicates with pCloudy’s servers over Ethernet (LAN or WAN) to reach the cloud-based device.

 

The Device Tunnel allows developers to gain more control over any cloud-based android device. Once a connection is established, the developers can perform the following actions:

 

  • Issue a number of adb commands for debugging, shell creations, port forwarding, and viewing general information about any cloud-based Android device
  • Copying and pushing files to connected cloud-based devices
  • Installing and uninstalling applications on cloud-based devices
  • Debugging apps during development or testing by adding breakpoints, inspecting variables, analyzing runtime metrics to optimize your app and more

 

This comes with the added advantage of accessing and performing these actions on any Android device among of hundreds that are hosted on our Cloud. This ability will also help developers to debug apps and determine the causes behind issues or bugs that are device specific.

 

On the whole, the Device Tunnel will aid developers and testers who need quick access to diverse devices for brisk evaluation of app and debugging. It enables developers and testers to instantly connect to any device hosted on cloud and easily identify problems by running interactive debug sessions.

 

To know more on how to connect any device on pCloudy using Device Tunnel click here