Winter Semeste1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

WINTER SEMESTER – 2022- 2023

ECE3502:- IoT Domain Analyst LAB


EXPERIMENT - 6

Registration Number:20BEE0188
Name: SABYASACHI SAMAL
Faculty: DR KARTHIKEYAN A
Slot: l19 +l20
Course code :- ECE3502
COURSE TITLE :- IoT Domain Analyst LAB
Experiment :- 6
Date:- 17TH FEBRUARY 2023
Aim :- Creating an Android application using kivy library using python
programming language.

Description about the experiment:-


Curiosity rises at its peak when we plan to develop our first Android
application. Android development typically depends on Kotlin, Java, Swift,
Flutter, and Lua Scripting Language. But nowadays, Python stepped into
the game, and like every other domain, Python is also digging its root deep
into Android application development.
Python is a general-purpose, universal, high-level, object-oriented
programming language. Because of all such features and paradigms, we
can use Python in developing applications for Android. Python does not
have any built-in mobile development service or framework. But as you all
know, Python is rich in packages, libraries, and frameworks; there are
frameworks and packages like Kivy, Beeware’s Toga, PyQt, etc.
Kivy is a cross-platform Python framework that allows application
developers to deploy apps in Windows, Linux, Mac, Raspberry Pi, and
Android, of course. This framework got released in the year 2011, and the
stabler version in 2019. It supports developing multitouch event-driven
applications in addition to regular taps, clicks, and keyboard inputs. Kivy
framework is designed in such a way that it supports GPU acceleration
leveraging the graphics card, and is built on top of OpenGL ES2. TIt is an
MIT license project, and therefore, developers can use this library for free or
even commercial purposes.

CODE:-
import kivy
from kivy.app import App
from kivy.uix.gridlayout import GridLayout
from kivy.uix.label import Label
from kivy.uix.textinput import TextInput
from kivy.uix.button import Button

class childApp(GridLayout):
def __init__(self,**kwargs):
super(childApp,self).__init__()
self.cols=2

self.add_widget(Label(text='employee : '))
self.e_name=TextInput()
self.add_widget(self.e_name)

self.add_widget(Label(text='empid : '))
self.e_id=TextInput()
self.add_widget(self.e_id)

self.add_widget(Label(text='Location : '))
self.e_location = TextInput()
self.add_widget(self.e_location)

self.press = Button(text='Click to sent to Terminal


window');
self.press.bind(on_press = self.click)
self.add_widget(self.press)

def click(self,instance):
print("Name of Employee"+self.e_name.text)
print("emp id" + self.e_id.text)
print("location of emp"+self.e_location.text)
print("")
class parentApp(App):
def build(self):
return childApp()

if __name__ == "__main__":
app= parentApp()
app.run()

CODE screenshot :-
Python Console: -

OUTPUT WINDOW :-
APPLICATION WINDOW :-

TERMINAL CONSOLE :-
TERMINAL CONSOLE OUTPUT :-
"E:\6TH SEMESTER\COURSE PAGE\IOT LAB\EXP 6\venv\Scripts\python.exe"
"E:/6TH SEMESTER/COURSE PAGE/IOT LAB/EXP 6/ANDROID_APP.py"

[INFO ] [Logger ] Record log in


C:\Users\SABYASACHI\.kivy\logs\kivy_23-03-01_0.txt

[INFO ] [deps ] Successfully imported "kivy_deps.angle"


0.3.3

[INFO ] [deps ] Successfully imported "kivy_deps.glew"


0.3.1

[INFO ] [deps ] Successfully imported "kivy_deps.sdl2"


0.4.5

[INFO ] [Kivy ] v2.1.0

[INFO ] [Kivy ] Installed at "E:\6TH SEMESTER\COURSE


PAGE\IOT LAB\EXP 6\venv\lib\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022,
16:36:42) [MSC v.1929 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "E:\6TH SEMESTER\COURSE
PAGE\IOT LAB\EXP 6\venv\Scripts\python.exe"
[INFO ] [Logger ] Purge log fired. Processing...

[INFO ] [Logger ] Purge finished!

[INFO ] [Factory ] 189 symbols loaded


[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2
(img_pil, img_ffpyplayer ignored)

[INFO ] [Text ] Provider: sdl2

[INFO ] [Window ] Provider: sdl2


[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] GLEW initialization succeeded

[INFO ] [GL ] Backend used <glew>

[INFO ] [GL ] OpenGL version <b'4.6.0 - Build


27.20.100.9664'>

[INFO ] [GL ] OpenGL vendor <b'Intel'>


[INFO ] [GL ] OpenGL renderer <b'Intel(R) UHD Graphics'>

[INFO ] [GL ] OpenGL parsed version: 4, 6


[INFO ] [GL ] Shading version <b'4.60 - Build
27.20.100.9664'>
[INFO ] [GL ] Texture max size <16384>

[INFO ] [GL ] Texture max units <32>


[INFO ] [Window ] auto add sdl2 input provider

[INFO ] [Window ] virtual keyboard not allowed, single mode,


not docked
[INFO ] [Base ] Start application main loop

[INFO ] [GL ] NPOT texture support is available

Name of EmployeeSABYASACHI SAMAL

emp id20BEE0188
location of empABLOCK ,MENS HOSTEL ,VIT VELLORE

Name of EmployeeDIBYAJYOTI SAMAL

emp id20BCE0188
location of empR-BLOCK ,MENS HOSTEL ,VIT VELLORE

KATAPADI

Name of EmployeeMAYANK RAJPUT


emp id20BCE1175
location of empA-BLOCK ,MENS HOSTEL ,VIT VELLORE

KATAPADI

[INFO ] [Clipboard ] Provider: winctypes

RESULT AND INFERENCE :-


Mobile application development using Python can be done using different
frameworks and libraries. But, amongst these, The Kivy framework is at
the top. It is well-known for its simplicity and ease of use widget
support. Kivy is cross-platform and easy to install in any environment. So,
developers can easily learn using it.

You might also like