Skip to content

Commit b9da81e

Browse files
committed
[[ [[ AndroidLaunchDataChanged ]] Remove launchData parameter
1 parent 107df99 commit b9da81e

File tree

5 files changed

+13
-20
lines changed

5 files changed

+13
-20
lines changed

docs/dictionary/message/launchDataChanged.xml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<name>launchDataChanged</name>
44
<type>message</type>
55
<syntax>
6-
<example>launchDataChanged <i>launchData</i></example>
6+
<example>launchDataChanged</example>
77
</syntax>
88
<synonyms>
99
</synonyms>
@@ -23,13 +23,9 @@
2323
</security>
2424
<description>
2525
<overview>Sent to the <glossary tag="current card">current card</glossary> when the <glossary tag="application">application</glossary>'s launch data is changed by a new request from another app.</overview>
26-
<parameters>
27-
<parameter>
28-
<name>launchData</name>
29-
<description>The new request data in the form of an array.</description>
30-
</parameter>
31-
</parameters>
32-
33-
<comments>An Android app may be suspended in the background when it receives a request from another app. When this happens, the app's launch data is updated to contain the data for the new request and the app is resumed. This message allows the app to handle these new requests appropriately.</comments>
26+
<comments>An Android app may be suspended in the background when it receives a request from another app. When this happens, the app's launch data is updated to contain the data for the new request and the app is resumed. The new launch data can be obtained from the <function tag="mobileGetLaunchData">mobileGetLaunchData</function> function.</comments>
3427
</description>
28+
<examples>
29+
<example><p>on launchDataChanged pURL</p><p> myLaunchHandler mobileGetLaunchData()</p><p>end launchDataChanged</p></example>
30+
</examples>
3531
</doc>

engine/src/java/com/runrev/android/Engine.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2876,7 +2876,7 @@ public void onResume()
28762876

28772877
if (m_new_intent)
28782878
{
2879-
doLaunchDataChanged(getLaunchData());
2879+
doLaunchDataChanged();
28802880

28812881
String t_launch_url;
28822882
t_launch_url = getLaunchUri();
@@ -3311,7 +3311,7 @@ private void onRunActivityResult(int p_result_code, Intent p_data)
33113311
// url launch callback
33123312
public static native void doLaunchFromUrl(String url);
33133313
// intent launch callback
3314-
public static native void doLaunchDataChanged(Map<String, Object> p_launch_data);
3314+
public static native void doLaunchDataChanged();
33153315

33163316
// callbacks from the billing service
33173317

engine/src/mblandroiddc.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2230,13 +2230,10 @@ JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doLaunchFromUrl(JNIEnv *en
22302230
MCNotificationPostUrlWakeUp(*t_url_str);
22312231
}
22322232

2233-
extern "C" JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doLaunchDataChanged(JNIEnv *env, jobject object, jobject launch_data) __attribute__((visibility("default")));
2234-
JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doLaunchDataChanged(JNIEnv *env, jobject object, jobject launch_data)
2233+
extern "C" JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doLaunchDataChanged(JNIEnv *env, jobject object) __attribute__((visibility("default")));
2234+
JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doLaunchDataChanged(JNIEnv *env, jobject object)
22352235
{
2236-
2237-
MCAutoArrayRef t_array;
2238-
if (MCJavaMapToArrayRef(env, launch_data, &t_array))
2239-
/* UNCHECKED */ MCNotificationPostLaunchDataChanged(*t_array);
2236+
/* UNCHECKED */ MCNotificationPostLaunchDataChanged();
22402237
}
22412238

22422239
////////////////////////////////////////////////////////////////////////////////

engine/src/mblnotification.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ void MCNotificationPostUrlWakeUp (MCStringRef p_url_wake_up_text)
175175
/* UNCHECKED */ MCNotificationPostCustom(MCM_url_wake_up, 1, p_url_wake_up_text);
176176
}
177177

178-
void MCNotificationPostLaunchDataChanged(MCArrayRef p_launch_data)
178+
void MCNotificationPostLaunchDataChanged()
179179
{
180-
/* UNCHECKED */ MCNotificationPostCustom(MCM_launch_data_changed, 1, p_launch_data);
180+
/* UNCHECKED */ MCNotificationPostCustom(MCM_launch_data_changed, 0);
181181
}
182182

183183
////////////////////////////////////////////////////////////////////////////////

engine/src/mblnotification.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void MCNotificationPostPushNotificationEvent(MCStringRef p_payload);
2424
void MCNotificationPostPushRegistered (MCStringRef p_registration_text);
2525
void MCNotificationPostPushRegistrationError (MCStringRef p_error_text);
2626
void MCNotificationPostUrlWakeUp (MCStringRef p_url_wake_up_text);
27-
void MCNotificationPostLaunchDataChanged(MCArrayRef p_data);
27+
void MCNotificationPostLaunchDataChanged();
2828
bool MCNotificationPostCustom(MCNameRef p_message, uint32_t p_param_count, ...);
2929

3030
#endif

0 commit comments

Comments
 (0)