[Bada开发]初步入口函数介绍

首先,使用bada SDK自带的IDE创建一个新的bada:

application project ,Project name 定为*。

程序的入口在自动生成的 *Entry.cpp文件中,入口函数是

  1. _EXPORT_ int OspMain(int argc, char *pArgv[]);
  2. AppLog("Application started.");

在Output中打印日志

  1. r = Osp::App::Application::Execute
  2. (test::CreateInstance, pArgs);

执行应用程序的CreateInstance 方法。

宏定义了long类型的result变量类型。作为接收

Osp::App::Application::Execute,成功返回E_SUCCESS。

  1. Application*
  2. test::CreateInstance(void)
  3. bool
  4. test::OnAppInitializing(AppRegistry& appRegistry)
  5. void
  6. test::OnForeground(void)
  7. bool
  8. test::OnAppTerminating(AppRegistry& appRegistry,
  9. bool forcedTermination)

退出时回到

  1. int OspMain(int argc, char *pArgv[])
原文地址:https://www.cnblogs.com/webapplee/p/3767831.html