Clouds App – Wipro CODE STORM App Hack 2015 Clouds App - Documentation Introduction : In have developed an Android App , named as Clouds App.It is a realtime weather forecast android application. This app supports weather forecast for 200,000 cities all over the world .I have made it to show forecast for 14 days . Clouds App Specification :Supports min SDK Version :10 ;Supports max SDK version:20. Needs permission for full network access. For Wipro’s CODE STORM App Hack , I have selected to build a weather app because everyone can relate themselves to weather .If I talk about technical aspects for the andorid’s framework , through Clouds App I have touched most of the framework’s apis.So I should start with the development process of the app. Just a glance over Android’s Architecture : Android framework is built over the Linux Kernel , so all the device drivers , security modules are just like as we have in our linux kernel . Clouds App – by Arindam Mishra Team Name : arindam7 Wipro ID : AR277544 Page 1 Clouds App – Wipro CODE STORM App Hack 2015 So as we can see from the Android’s architecture , that android framework is a software stack with different layers with different responsibilities over Linux Kernel . The Android framework is designed by keeping one most important thing in the mind that our mobile devices are resource constraint , by this statement I mean that mobile devices have limited RAM , CPU power and the battery life . I will show you the flow process for building an Android Application . So , this app development flow has five phases , its brief description is below: 1) Android Project : In Clouds App I have used Android Studio for development , as it is recommended by Google to get the best out of the Android’s framework .So after completing all the coding ,I will move to building the project . 2) Build the Project :In my app I have used Gradle for building the project .There are many reasons for supporting Gradle , we don’t have to add jar files manually , as we do in eclipse .In gradle I just have to give all my project’s dependencies in the “build.gradle” Clouds App – by Arindam Mishra Team Name : arindam7 Wipro ID : AR277544 Page 2 Clouds App – Wipro CODE STORM App Hack 2015 file.That’s it all the heavy lifting of building the project is done by gradle . 3) Android Package .apk file generation : So finally we have to generate the Android’s executable file “.apk” . Android package not only contains my android’s activity java code but the uncompiled resources also .In the Clouds App , there are many uncompiled resources like app image resources , string rsouces etc . 4) ART and DALVIK : So just like our java programs run on JavaVirtualMachine , in the same manner Android’s executables run on DalvikVirtualMachine (DVM). DVM compiles the .dex(DalvikExecutableFormat) files which is generated during the build process of the app . These .dex files will be present in the Android’s packaged .apk file . Now Google has replaced DVM by ART . Android runtime (ART) is the managed runtime used by applications and some system services on Android. ART and its predecessor Dalvik were originally created specifically for the Android project. ART as the runtime executes the Dalvik Executable format and Dex bytecode specification.ART and Dalvik are compatible runtimes running Dex bytecode, so apps developed for Dalvik should work when running with ART. 5) Signing : Now the .apk is ready , but before it goes for the installation to any device it needs to be digitally signed by the developer . Android Studio supports two types of signing and .apk generation . One is debug release and the second one is production release . Clouds app is the production-realse signed apk file . 6) So the last phase is to install the apk either on a virtual device or any real device . I have used my tablet (with USB debugging enabled on it ) throughout the app built process to debug as well as to run the production release apk file . Clouds App – by Arindam Mishra Team Name : arindam7 Wipro ID : AR277544 Page 3 Clouds App – Wipro CODE STORM App Hack 2015 So now something specific to the Clouds App Functionality : Clouds App is a weather forecast app , it gives user the weather forecast for 14 days .Cloulds App take location postal code as input to search for the weather conditions .I have selected the postal code to be given as an input because user may make a spelling mistake while giving the city name as an input . It allows the user to share the weather info to all the other apps installed on the device . Clouds app also show the weather notifications on the notification bar of the device . As the android framework provides us to fire the implicit intent to other activities , I have utilized this feature .So I launced an implicit intent to the maps app with the location info . So the user can also see the weather of the location and the map as well . So how Clouds App is getting the real time weather data for 200,000 cities all over the world . I have used Open Weather Map api , it is http based rest api to provide the weather data in JSON and XML format , I have used JSON format . http://openweathermap.org/api. I have placed the screenshots also in the folder , please check it . Best regards , Arindam Mishra (WT01 - Banking & Financial Services) Wipro Emp ID : AR277544 TeamName: arindam7 Team Leader :Arindam Mishra Clouds App – by Arindam Mishra Team Name : arindam7 Wipro ID : AR277544 Page 4
© Copyright 2024