Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • What are the building blocks of Xamarin.android

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 228
    Comment on it

    Hi,

    In this blog I will continue on the blog I earlier posted What is Xamarin, and we will discuss about the building blocks of Xamarin Android.

    Application.

    1. Android Manifest
    2. Assembly Info
    3. Xamarin.Forms
    4. Resources
    5. Activity Class etc.

    Here, Android Manifest can be thought of a recipe to describe all the pieces and permissions and characteristics of your application in one place. It allows your device or emulator to know what is exactly contained in it and can use that to ask the user if it is ok for your application to use certain permissions or things like that.

    When we create the Android application, just by following the steps file> new project > Android > Blank App (Android), We can see the bellow file structure inside the AndroidManifest.xml file:

    alt text

    We can see bellow code, inside the AndroidManifest.xml file:

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="App1.App1" android:versionCode="1" android:versionName="1.0">
    <uses-sdk />
    <application android:label="App1" android:icon="@drawable/Icon">
    </manifest>
    

    Here we have the application element which contains the two elements 1.android:label 2.android:icon

    The android:label by default, when built and deployed, views an APK package. You will see the icon on the main screen of the device once its installed. It will be represented by this element here @drawable/Icon which maps into the Resources folder under drawable, the Icon.png. Now, underneath that icon or depending on the view associated with that icon, the name of your application will be specified by the android:label attribute value, android:label="MyAndroidApp" and we can change it if we want. It will be shown when the apk is deployed.

    You can also change the configuration of the Android Manifest file by just right clicking on the solution. When you go to properties, you see the options to set the various configurations of the Android Manifest file, like the API level, Android Version and all, which will define the behavior of your application.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: