Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
Application debugging on android phones form a major part of the application development cycle. SAP Fiori Client Cordova android app can offer an easy way to get into the nuts and bolts of a SAP Fiori application through an android device for the purpose of debugging the code and ensuring it works as expected. The Fiori Client App is based in Android and allows for interaction with all of the basic functions of the handset such as the camera, geo-location, and pretty much anything that the android device offers in terms of functionality to its native applications. For this particular explanation, we're going to use a standard android device for the handset and a MacBook Pro, with Google Chrome installed on it. Let's dive right into debugging our SAP Fiori app through our android handset.

Setting up Our Debugging

The first thing we're going to do is to run the SAP Fiori app we're intending to debug on the handset and login to the system. Following this, we're going to connect the handset to our computer. After we establish the connection, we're going to open Chrome and set up our dev environment by opening DevTools. In the settings tab, we need to ensure that Discover USB Devices is selected. Now we enter the following address into our Chrome browser: chrome://inspect/#devices

This opens up a window showing our connected devices. If no connected devices show up, then we will need to enable the developer mode on our Android handset. To get into developer mode, we navigate to the Settings menu, under About Phone, and tap on the build version a few times (usually it's about five [5] times, but different proprietary installs may require more taps to enable the developer mode trigger). A notification should appear on the phone acknowledging the switching on of the developer mode on this handset. If we still don't see the device come up in our browser page, we may need to enable the USB debugging setting on our device. Enabling developer mode allows us to get access to a new settings menu named Developer Settings. in there we can find the toggle to activate USB Debugging. Once we have that activated, the handset should show up in our list of devices connected to our computer through the Chrome inspector.

Getting Down to Business

Now that we have successfully managed to connect our phone to the browser, where you can search a list of direct installment lenders, we can look at the actual debugging of code. The connection allows us to remotely launch the app in Chrome, making it much easier to debug the actual code and see what works and what doesn't. By using the inspector, we make our lives easier, since Android doesn't have any native debugging IDE's that we can use to get access to the code. The system simply runs the APK as is and it's up to us to figure out what's causing the problems on the device. Remote debugging forms one of the most essential tools that an app developer targeting Android has. The flexibility of the Chrome browser allowing us to inspect code and correct it makes for an indispensable tool for any app developer.

Fixing Problems on Android Devices

Applications probably won't run as expected all the time. In fact, sometimes they won't run as expected at all. The idea behind debugging on an android device is to see if the coding done on a PC would be feasible in a mobile environment. In order to cover the largest amount of devices, testing should be done with a wide range of handsets covering all the most recent releases of the Android OS to ensure compatibility across the board. Constant testing and improvement is the only way to ensure that an application keeps functioning with each new operating system update.
Labels in this area