本文整理匯總了Java中org.appcelerator.kroll.annotations.Kroll.onAppCreate方法的典型用法代碼示例。如果您正苦於以下問題:Java Kroll.onAppCreate方法的具體用法?Java Kroll.onAppCreate怎麽用?Java Kroll.onAppCreate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.appcelerator.kroll.annotations.Kroll
的用法示例。
在下文中一共展示了Kroll.onAppCreate方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onAppCreate
import org.appcelerator.kroll.annotations.Kroll; //導入方法依賴的package包/類
@Kroll.onAppCreate
public static void onAppCreate(TiApplication app)
{
Log.d(LCAT, "inside onAppCreate");
// put module init code that needs to run when the application is created
// Store a reference to the parse singleton now that the app is ready
parseSingleton = ParseSingleton.Instance();
// Obtain the application and client keys from the tiapp.xml file.
// It must be stored there because of the way Android applications work,
// we can't initialize the module during runtime because the application is
// started when a push notification is received
String propertyAppId = app.getAppProperties().getString(ParseSingleton.PROPERTY_APP_ID, "");
String propertyClientKey = app.getAppProperties().getString(ParseSingleton.PROPERTY_CLIENT_KEY, "");
String propertyServerUrl = app.getAppProperties().getString(ParseSingleton.PROPERTY_SERVER_URL, "");
// Invoke the Parse SDK Initialize method
//parseSingleton.InitializeParse(propertyAppId, propertyClientKey, app);
parseSingleton.InitializeParseWithConfig(propertyAppId, propertyClientKey, propertyServerUrl, app);
}
示例2: onAppCreate
import org.appcelerator.kroll.annotations.Kroll; //導入方法依賴的package包/類
@Kroll.onAppCreate
public static void onAppCreate(TiApplication app)
{
String appId = TiApplication.getInstance().getAppProperties().getString(ParseModule.PROPERTY_APP_ID, "");
String clientKey = TiApplication.getInstance().getAppProperties().getString(ParseModule.PROPERTY_CLIENT_KEY, "");
String serverUrl = TiApplication.getInstance().getAppProperties().getString(ParseModule.PROPERTY_SERVER_URL, "");
Log.d(TAG, "Initializing with: " + appId + ", " + clientKey + ", " + serverUrl);
Parse.initialize(new Parse.Configuration.Builder(TiApplication.getInstance())
.applicationId(appId)
.clientKey(clientKey)
.server(serverUrl + "/") // The trailing slash is important.
.build()
);
}
示例3: onAppCreate
import org.appcelerator.kroll.annotations.Kroll; //導入方法依賴的package包/類
@Kroll.onAppCreate
public static void onAppCreate(TiApplication app)
{
Log.d(TAG, "inside onAppCreate");
if(!app.getAppProperties().hasProperty(PROPERTY_NOTIFICATION_COUNTER)) {
app.getAppProperties().setInt(PROPERTY_NOTIFICATION_COUNTER, 0);
}
}
示例4: onAppCreate
import org.appcelerator.kroll.annotations.Kroll; //導入方法依賴的package包/類
@Kroll.onAppCreate
public static void onAppCreate(TiApplication app)
{
if(!app.getAppProperties().hasProperty(PROPERTY_NOTIFICATION_COUNTER)) {
app.getAppProperties().setInt(PROPERTY_NOTIFICATION_COUNTER, 0);
}
}
示例5: onAppCreate
import org.appcelerator.kroll.annotations.Kroll; //導入方法依賴的package包/類
@Kroll.onAppCreate
public static void onAppCreate(TiApplication app) {
Log.d(LCAT, "Create beaconmanager, setup in foregroundmode");
beaconManager = BeaconManager.getInstanceForApplication(app);
beaconManager.setBackgroundMode(false);
beaconManager.setDebug(false);
}
示例6: onAppCreate
import org.appcelerator.kroll.annotations.Kroll; //導入方法依賴的package包/類
@Kroll.onAppCreate
public static void onAppCreate(TiApplication app)
{
Log.d(LCAT, "inside onAppCreate");
// put module init code that needs to run when the application is created
}
示例7: onAppCreate
import org.appcelerator.kroll.annotations.Kroll; //導入方法依賴的package包/類
@Kroll.onAppCreate
public static void onAppCreate(TiApplication app) {
Log.d(LCAT, "inside onAppCreate");
}
示例8: onAppCreate
import org.appcelerator.kroll.annotations.Kroll; //導入方法依賴的package包/類
@Kroll.onAppCreate
public static void onAppCreate(TiApplication app) {
Log.d(LCAT, "onAppCreate " + app + " (" + (instance != null) + ")");
}
示例9: onAppCreate
import org.appcelerator.kroll.annotations.Kroll; //導入方法依賴的package包/類
@Kroll.onAppCreate
public static void onAppCreate(TiApplication app) {
// put module init code that needs to run when the application is created
}
示例10: onAppCreate
import org.appcelerator.kroll.annotations.Kroll; //導入方法依賴的package包/類
@Kroll.onAppCreate
public static void onAppCreate(TiApplication app)
{
}
示例11: onAppCreate
import org.appcelerator.kroll.annotations.Kroll; //導入方法依賴的package包/類
@Kroll.onAppCreate
public static void onAppCreate(TiApplication app) {
Log.d(LCAT, "TiIntercom : onAppCreate");
theApp = app;
}
示例12: onAppCreate
import org.appcelerator.kroll.annotations.Kroll; //導入方法依賴的package包/類
@Kroll.onAppCreate
public static void onAppCreate(TiApplication app) {
Log.d(LCAT, "inside onAppCreate");
// put module init code that needs to run when the application is
// created
}
示例13: onAppCreate
import org.appcelerator.kroll.annotations.Kroll; //導入方法依賴的package包/類
@Kroll.onAppCreate
public static void onAppCreate(TiApplication app) {
}
示例14: onAppCreate
import org.appcelerator.kroll.annotations.Kroll; //導入方法依賴的package包/類
@Kroll.onAppCreate
public static void onAppCreate(TiApplication app) {
}