Kodesoft Technology Posts

     Objective : The main purpose of this post   to learn facebook integrate in swift      OUTPUT  : If  I Integrate Facebook In My Application Then I will Get…

Read More Facebook Integration using Swift

iPhone

The Model-View-Controller (MVC) is an architectural design pattern that seperates an application in three components : first is Model, second is View, third is Controller.

Here is the flow-diagram of MVC :-

 

MVC-basic.svg

 

Diagram shows the single flow layout of data, how it is passed between each components, and show the relationship between each component works.

Model

The Model component corresponds to all the data-related logic that the user works with.The Model is the name given to the permanent storage of the data used in the overall design.

Model represents shape of the data and business logic. It maintains the data of the application. Model objects retrieve and store model state in a database.

One important aspect of the Model is that it’s technically “blind” – that means the model has no connection or knowledge of what happens to the data when it is passed to the View or Controller components.

Model is a data and business logic.

View

View display data using model to the user and also enables them to modify the data.

The View component is used for all the UI logic of the application

The View is where data, requested from the Model, is viewed and its final output is determined.

In web apps built using MVC, the View is the part of the system where the HTML is generated and displayed.

View is a user interface.

Controller

Controller act as an interface between Model and view components to precess all the incoming requests.

It handles the users request.User interact with View, which in-tern raises appropriate URL request, this request will be handled by a controller.

Controller is a request handler.

Read More What is MVC ?

PHP Web Development

Dialog box is a small window that prompts the user to make a decision or enter additional information. A dialog does not fill the full-screen and is normally used for modal events that require users to take an action before they can proceed.

And a Custom-dialog-box is same as dialog-box only difference is that in custom dialog-box you design dialog-box  on  your requirement. For Example- create dialog-box to enter four digit OTP number  in Which  you  take  four edit Text  with  equal distance to enter password and take one  “submit “ button.

 To create Custom-dialog-box follows step-by-step:

i)First create a new project in android studio and design layout for dialogBox.

 Android Layout File:

XML file, for custom  dialog.

File : res/layout/custom_dialog.xml

To, design layout you set  accordingly  margin,padding-left,right,top and bottom,height and width etc.

<LinearLayout

android:id=“@+id/layout_header”
android:layout_width=“match_parent”
android:layout_height=“44sp”
android:background=“@color/light_green”>

<TextView
android:layout_width=“match_parent”
android:layout_height=“44sp”
android:gravity=“center”
android:text=“Enter One Time Password”
android:textColor=“@color/white”
android:textSize=“@dimen/dm_20sp” />

</LinearLayout>
<LinearLayout
android:id=“@+id/layout_otp”
android:layout_width=“match_parent”
android:layout_height=“@dimen/dm_90sp”
android:layout_below=“@+id/layout_header”
android:orientation=“horizontal”>

<EditText
android:id=“@+id/editTextone”
android:layout_width=“@dimen/dm_40sp”
android:layout_height=“@dimen/dm_42sp”
android:inputType=“numberPassword”
android:maxLength=“1”
android:nextFocusRight=“@+id/editText_two”>

<requestFocus />
</EditText>

<EditText
android:id=“@+id/editTexttwo”
android:layout_width=“@dimen/dm_40sp”
android:layout_height=“@dimen/dm_42sp”
android:inputType=“numberPassword”
android:maxLength=“1”/>

<EditText
android:id=“@+id/editTextthree”
android:layout_width=“@dimen/dm_40sp”
android:layout_height=“@dimen/dm_42sp”
android:inputType=“numberPassword”
android:maxLength=“1”/>

<EditText
android:id=“@+id/editTextfour”
android:layout_width=“@dimen/dm_40sp”
android:layout_height=“@dimen/dm_42sp”
android:inputType=“numberPassword”
android:maxLength=“1”/>

</LinearLayout>

<Button
android:layout_width=“match_parent”
android:layout_height=“@dimen/dm_42sp”
android:layout_below=“@+id/layout_otp”
android:text=“SUBMIT” />

ii) In Activity

First create Custom_DialogBox.java class and write the code below

File : Custom_DialogBox.java

First  use changedListener in  onCreate  method:

 editText_one.addTextChangedListener(this);
editText_two.addTextChangedListener(this);
editText_three.addTextChangedListener(this);
editText_four.addTextChangedListener(this); 

And final class of  “Custom_DialogBox.java ”  :-

public class Custom_dialogbox extends Dialog implements TextWatcher

 And then Create automatically override method for TextWatcher. 

@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {}

To enter only one value to edit Text and cursor move on next edit Text automatically and when we want to remove password one by one sequencially in which cursor move back automatically,to write the cobe below on this method: 

@Override
public void afterTextChanged(Editable editable) {if (editable.length() == 1) {
if (editText_one.length() == 1) {
editText_two.requestFocus();
}

if (editText_two.length() == 1) {
editText_three.requestFocus();
}
if (editText_three.length() == 1) {
editText_four.requestFocus();
}
} else if (editable.length() == 0) {
if (editText_four.length() == 0) {
editText_three.requestFocus();
}
if (editText_three.length() == 0) {
editText_two.requestFocus();
}
if (editText_two.length() == 0) {
editText_one.requestFocus();
}
}

 After you add this Custom_DialogBox.java class in your MainActivity.java

Custom_DialogBox custom_dialog = new Custom_DialogBox(this);
custom_dialog.show();

 Follow the above steps and see a custom-dialog-box accurately.

Read More Steps To Create a Custom-Dialog-Box to Enter Four Digit OTP Number in Android

Android

e-commerce

Thinking about starting an eCommerce startup but you simply don’t know how?

Does it seem like an impossible challenge for you?

…you’re not alone.

So before anything just make proper plan and then execute in better way.

One of the major reasons, why online eCommerce startups succeed its  because of the right development / consultant partner selection.

So being a startup you need to be very careful while selecting the team or company  for your online eCommerce web portal development as well as Mobile Application. So you need to select best team to handle all the development process from scratch and make proper plan to execute.

Four parameters for your startup eCommerce business:

  1. Ecommerce Development Expertise: Start the ecommerce web portal development expertise before you handover your project development work by discussing their work examples in detail. You can also ask about their client references and just to be sure does a reference check that whatever they are claiming as their developed web portals are originally delivered by them only. Also refer a few resumes/portfolio /profile to assess their expertise in ecommerce  development and short list top talents to compare with few other IT companies / consultants/freelancers.
  2. E-commerce Consulting Experience or Expertise: Apart from the technical expertise, being a startup company, it is most important for you to review their(companies/freelancer) domain expertise in the ecommerce field. You should choose a company which not only delivers technically but also understands the ecommerce depth and can consult you with respect to further steps which can take your online business to the next level. It means you need technical person as well as ecommerce adviser they can give you advice.
  3. Support & Maintenance( after product delivery until its stable): The team must be ready to provide support after initial ecommerce development, third party integrations, bug fixing and maintenance tasks. They should also know about payment integration methodologies
  4. Marketing :  Marketing of any product play vital role in product success. 90% of product success and failure is depends on marketing stuffs. So Choose wisely a marketing team If the company know  how to market the products online and how they reach the goal , it is an added advantage for you to select them However before allocating your business projects to them. you should review their past projects and the growth of their past clients with their efforts.

 

One of the important aspect of eCommerce success is Mobile application. Because of my generation, everything they want in smart phone. So mobile application is also play very important role for product success.

We also provide end –to –end Web and mobile application support and maintenance as well as development To more about my service and solutions drop us an email at  info@kodesoft.in

Read More Four Things You Need To Know Before Ecommerce Startups:

Mobile Development Trends Web Development

Following example shows step-by-step process to  how to integrate an AdMob advertisement into your Android application:

Step 1 If you are not already registered at AdMob, just visit the AdMob Website and create a new account. After the registration process you can see your empty AdMob dashboard. The screenshot below shows an empty AdMob dashboard:

Click on monetize new app then bellow screen will appear:

admob1

Step 2: Click on Add your app manually.Bellow Screen will show

admob2

Step 3: Click on Add App Button :next screen look like is as bellow:

admob3

Step 4:   Download Admob Android sdk: The AdMob Android SDK allows the developer to seamlessly integrate an advertisement within an Android based application. Download and unzip the Android jar archive (googleadmobadssdkandroid.zip). The archive contains the AdMob Android SDK for integrating an ad view into your Android user interface layouts (GoogleAdMobAdsSdk-6.1.0.jar).

Step 5: Let add admob jar file in your native application:googleadmobadssdkandroid.zip  unzip it and copy in lib folder in your anroid application:   Start Eclipse and create a new Android based Java application.   Create a /libs folder directly within the root folder of your Android project folder and copy the AdMob Android SDK jar into that folder. Right click on your project and add this library to your projects build path by selecting Build Path > Add External Archive…

The sample application consists of a simple main layout that contains a single TextView. Now we are going to modify this simple layout to contain an AdView. Therefore we add a new AdView as it is shown below:

<?xml version=”1.0″ encoding=”utf-8″?>

<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”

xmlns:ads=”http://schemas.android.com/apk/lib/com.google.ads”

android:layout_width=”fill_parent”

android:layout_height=”fill_parent”

android:orientation=”vertical” >

<TextView

android:layout_width=”fill_parent”

android:layout_height=”wrap_content”

android:text=”@string/hello” />

 

<com.google.ads.AdView

android:id=”@+id/adview”

android:layout_width=”fill_parent”

android:layout_height=”wrap_content”

ads:adSize=”BANNER”

ads:adUnitId=”a1501676c633fac”

ads:loadAdOnCreate=”true”

ads:testDevices=”TEST_EMULATOR, TEST_DEVICE_ID”

/>

</LinearLayout>

 

Step 6: Go to the AndroidManifest.xml file file open it and give the required permission:

Now add the Google AdActivity as well as both necessary permissions ACCESS_NETWORK_STATE and INTERNET to your AndroidManifest.xml file as it is shown here: 

<uses-permission android:name=”android.permission.ACCESS_NETWORK_STATE”/>

<uses-permission android:name=”android.permission.INTERNET”/>

Code will look like bellow in AndroidManifest.xml

<?xml version=”1.0″ encoding=”utf-8″?>

<manifest xmlns:android=”http://schemas.android.com/apk/res/android”

package=”at.smartlab.androidbook.AdMobTest”

android:versionCode=”1″

android:versionName=”1.0″ >

 

<uses-sdk android:minSdkVersion=”15″ />

 

<application

android:icon=”@drawable/ic_launcher”

android:label=”@string/app_name” >

<activity

android:name=”.AdMobTestActivity”

android:label=”@string/app_name” >

<intent-filter>

<action android:name=”android.intent.action.MAIN” />

<category android:name=”android.intent.category.LAUNCHER” />

</intent-filter>

</activity>

<activity android:name=”com.google.ads.AdActivity”

android:configChanges=”keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize”/>

</application>

 

<uses-permission android:name=”android.permission.ACCESS_NETWORK_STATE”/>

<uses-permission android:name=”android.permission.INTERNET”/>

</manifest>

 

Step 7:To receive ads from AdMob you have to create an AdRequest instance within your own Activity and hand it over to your AdView layout element, as it is shown below:  

 

package at.smartlab.androidbook.AdMobTest;

 

import com.google.ads.AdRequest;

import com.google.ads.AdView;

 

import android.app.Activity;

import android.os.Bundle;

 

public class AdMobTestActivity extends Activity {

/** Called when the activity is first created. */

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

 

setContentView(R.layout.main);

 

// Look up the AdView as a resource and load a request.

AdView adView = (AdView)this.findViewById(R.id.adview);

adView.loadAd(new AdRequest());

}

}

Step 8: Copy the bellow code in layout/main.xml file 

<com.google.ads.AdView

android:id=”@+id/adview”

android:layout_width=”fill_parent”

android:layout_height=”wrap_content”

ads:adSize=”BANNER”

ads:adUnitId=”a1501676c633fac”

ads:loadAdOnCreate=”true”

ads:testDevices=”TEST_EMULATOR, your test device ID goes here”

/>

 

To know the your test device ID goto the logcat file and copy it

The resulting Android app shows the demanded advert in combination with a HelloWorld TextView:

admob4

Read More AdMob Advertising in Android Application/Game Step wise process

Android iPhone Mobile Development

PHP wordPress