大家關(guān)心的問題,開發(fā)短信程序(java)
Jun 21, 2016 am 09:13 AM程序|問題
以亞信的CMPP1.22API為例(java)
aiismg.jcmppapi包
包含class CMPPAPI, CMPPDeliverResp, CMPPQueryResp etc.
和一般的程序沒有區(qū)別
CMPPAPI pCMPPAPI = new CMPPAPI();
if( pCMPPAPI.InitCMPPAPI( "../config/javacmppc.ini" ) != 0 ) {
if( nOutput == 1 ) {
System.out.println( "Fail to call InitCMPPAPI!" );
}
System.exit( 1 );
}
// CMPPSendSingle包括參數(shù)服務(wù)代碼,接受手機,發(fā)送端口,計費手機,消息格式,消息級別,是否回復(fù)等參數(shù)
if( pCMPPAPI.CMPPSendSingle( nNeedReply, nMsgLevel,
sServiceID, nMsgFormat,
sFeeType, sFeeCode,
sValidTime, sAtTime,
sSrcTermID, sDestTermID,
nMsgLen, sMsgCon,
sMsgID, (byte)0, null, (byte)0, (byte)0 ) != 0 )
{
if( nOutput == 1 ) {
System.out.println( "Fail to call CMPPSendSingle, error=" + pCMPPAPI.GetErrCode() );
}
System.exit( 1 );
}
接收的程序就做一個線程通過
private CMPPDeliverResp deliver = new CMPPDeliverResp();
int error = CMPPDeliver( nTimeout, deliver );
來處理返回的數(shù)據(jù)。其他公司的API各有各的寫法。
其他需要高級功能的,可自行在CMPP協(xié)議基礎(chǔ)上進行開發(fā)。

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Java document interpretation: Usage analysis of the currentTimeMillis() method of the System class, specific code examples are required. In Java programming, the System class is a very important class, which encapsulates some properties and operations related to the system. Among them, the currentTimeMillis method is a very commonly used method in the System class. This article will explain the method in detail and provide code examples. 1. Overview of currentTimeMillis method

php提交表單通過后,彈出的對話框怎樣在當(dāng)前頁彈出php提交表單通過后,彈出的對話框怎樣在當(dāng)前頁彈出而不是在空白頁彈出?想實現(xiàn)這樣的效果:而不是空白頁彈出:------解決方案--------------------如果你的驗證用PHP在后端,那么就用Ajax;僅供參考:HTML code

The win10 system is a very easy-to-use and highly intelligent system. Its strong compatibility can ensure that the system will basically not have any problems during normal use. However, as people continue to use the win10 system, sometimes the system will also have problems. The problem of Win10 booting blue screen termination code SystemServiceException. Today I will bring you the solution to Win10 booting Blue Screen termination code SystemServiceException. If you need it, please download it quickly. Solution to win10systemserviceexception blue screen: Method 1: 1. Use Windows key + R to open Run and enter “contr

The computer system is a relatively common system process. You will often see system when viewing the process. This process simply means the computer system; however, if the system.exe process appears on the computer, it needs to be deleted in time. , this is a file generated by a Trojan horse virus. There is no exe suffix behind the real system.

Object is the base class of all Java classes, the top of the entire class inheritance structure, and the most abstract class. Everyone uses toString(), equals(), hashCode(), wait(), notify(), getClass() and other methods every day. Maybe they don’t realize that they are methods of Object, and they don’t look at what other methods Object has. And think about why these methods should be placed in Object. 1. Introduction to JavaObject class - the super class of all classes Object is a special class in the Java class library and is also the parent class of all classes. In other words, Java allows any type of object to be assigned to the Object type

I believe that netizens are very familiar with the Windows 7 system. Have you heard of the Windows 7 English version system? I believe that many netizens have heard about the Windows 7 English version system. However, some friends are looking for the Windows 7 English version system to download. Today I will The editor is going to share the introduction of the original version of win7 in English with everyone, so that netizens can understand the original version of win7 in English. The following is to tell you where to download the English version of Windows 7 system. The original English system of win7 has been released to MSDN for subscription download. The official English integrated version was first released, Windows7WithSP1, which is the Windows7 CD image with integrated SP1. Includes SP1 standalone for multiple languages

Microsoft has announced the availability of System Center 2022. The latest version brings System Center Operations Manager (SCOM), Virtual Machine Manager (VMM), System Center Orchestrator (SCORCH), Service Manager (SM) and Data Protection Manager

Step back in time to the Macintosh of the 1990s and run complete virtual installations of System 7 and MacOS 8 in a browser window. One flaw with new virtual versions of 1990s Mac software is that they run at the speed of a 2020s Mac. You're looking at a MacSE/30 or Quadra700, but everything is as fast as Apple Silicon. You can actually work in these simulated operating systems, and they can even drag documents or files in and out of macOS Monterey. But whether for some practical purposes or more likely just for pure fun, here's how
