Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;

import android.telephony.SmsManager;

public class Main {
    public static String getCharCountStringForSMS(String text) {
        SmsManager smsMan = SmsManager.getDefault();
        ArrayList<String> dividedMessages = smsMan.divideMessage(text);
        int size = dividedMessages.size();
        return text.length() + "/" + size;
    }
}