Skip to content

Commit

Permalink
Remove surveys (#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yarden Eitan authored and Sergio Alonso Fernández committed Apr 3, 2017
1 parent a51f6f6 commit 310719a
Show file tree
Hide file tree
Showing 45 changed files with 357 additions and 2,700 deletions.
16 changes: 8 additions & 8 deletions acceptance/test-application/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,22 @@
<meta-data android:name="com.mixpanel.android.MPConfig.DisableFallback"
android:value="false" />

<!-- The Mixpanel library will automatically attempt to show available surveys or in
<!-- The Mixpanel library will automatically attempt to show available in
app notifications every time a new Activity is displayed. To disable this behavior,
add the following line. The default value for this option is set to true. -->
<meta-data android:name="com.mixpanel.android.MPConfig.AutoShowMixpanelUpdates"
android:value="false" />

<!-- If you wish to test receiving surveys or notifications multiple times, the following option
will prevent tracking that a survey or notification has been displayed to Mixpanel.
This will allow you to tweak your surveys or in app notifications without having to create
<!-- If you wish to test receiving notifications multiple times, the following option
will prevent tracking that a notification has been displayed to Mixpanel.
This will allow you to tweak your in app notifications without having to create
a new one each time. -->
<meta-data android:name="com.mixpanel.android.MPConfig.TestMode"
android:value="true" />

<!-- This will enable various debugging messages that shows communication between the Mixpanel
Android library and the Mixpanel API servers, which are useful for seeing when track requests
go out and when surveys and notifications are received. -->
go out and when notifications are received. -->
<meta-data android:name="com.mixpanel.android.MPConfig.EnableDebugLogging"
android:value="true" />

Expand All @@ -89,11 +89,11 @@
</intent-filter>
</activity>

<!-- This activity allows your application to show Mixpanel surveys and takeover in app notifications.
<!-- This activity allows your application to show Mixpanel takeover in app notifications.
If you only wish to show mini in app notifications, you do not need to declare this Activity.
You may also specify a different theme to better fit the look and feel of your application. -->
<activity android:name="com.mixpanel.android.surveys.SurveyActivity"
android:theme="@style/com_mixpanel_android_SurveyActivityTheme"/>
<activity android:name="com.mixpanel.android.takeoverinapp.TakeoverInAppActivity"
android:theme="@style/com_mixpanel_android_TakeoverInAppActivityTheme"/>

<!-- This receiver will allow your application to register for and receive Mixpanel push notifications -->
<receiver android:name="com.mixpanel.android.mpmetrics.GCMReceiver"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,10 @@ protected void onResume() {
throw new RuntimeException("Could not encode hour of the day in JSON");
}

// If you have surveys or notifications, and you have set AutoShowMixpanelUpdates set to false,
// the onResume function is a good place to call the functions to display surveys or
// in app notifications. It is safe to call both these methods right after each other,
// since they do nothing if a notification or survey is already showing.
// If you have notifications and you have set AutoShowMixpanelUpdates set to false,
// the onResume function is a good place to call the functions to display
// in app notifications. It is safe to call both these methods right after each other.
mMixpanel.getPeople().showNotificationIfAvailable(this);
mMixpanel.getPeople().showSurveyIfAvailable(this);
OnMixpanelUpdatesReceivedListener listener = new OnMixpanelUpdatesReceivedListener() {
@Override
public void onMixpanelUpdatesReceived() {
Expand Down
2 changes: 1 addition & 1 deletion acceptance/test_property.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def tearDown(self):
self.driver.quit()

def test_change_text_size(self):
decide_message = '{"notifications":[],"surveys":[],"variants":[{"tweaks":[],"actions":[{"property":{"classname":"android.widget.TextView","set":{"parameters":[{"type":"java.lang.Integer"},{"type":"java.lang.Float"}],"selector":"setTextSize"},"name":"fontSize","get":{"result":{"type":"java.lang.Float"},"parameters":[],"selector":"getTextSize"}},"path":[{"index":0,"prefix":"shortest","id":16908290},{"index":0,"view_class":"android.widget.RelativeLayout"},{"index":0,"mp_id_name":"edit_first_name"}],"args":[[2,"java.lang.Integer"],[36,"java.lang.Float"]],"change_type":"property","name":"c150"}],"id":24219,"experiment_id":12207}]}'
decide_message = '{"notifications":[],"variants":[{"tweaks":[],"actions":[{"property":{"classname":"android.widget.TextView","set":{"parameters":[{"type":"java.lang.Integer"},{"type":"java.lang.Float"}],"selector":"setTextSize"},"name":"fontSize","get":{"result":{"type":"java.lang.Float"},"parameters":[],"selector":"getTextSize"}},"path":[{"index":0,"prefix":"shortest","id":16908290},{"index":0,"view_class":"android.widget.RelativeLayout"},{"index":0,"mp_id_name":"edit_first_name"}],"args":[[2,"java.lang.Integer"],[36,"java.lang.Float"]],"change_type":"property","name":"c150"}],"id":24219,"experiment_id":12207}]}'
self._launch_app(decide_message)

self.assertEquals(self.driver.find_element_by_id('edit_first_name').get_attribute('textSize'), '108.0')
Expand Down
5 changes: 1 addition & 4 deletions maven.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,14 @@ task androidJavadocs(type: Javadoc, dependsOn: ':generateReleaseBuildConfig') {
'**/util/RemoteService.java',
'**/util/StackBlurManager.java',
'**/util/StringUtils.java',
'**/AlwaysSubmittableEditText.java',
'**/CardCarouselLayout.java',
'**/FadeOnPressButton.java',
'**/FadingImageView.java',
'**/InAppFragment.java',
'**/MiniCircleImageView.java',
'**/ResourceIds.java',
'**/ResourceReader.java',
'**/SurveyActivity.java',
'**/SurveyChoiceView.java',
'**/SurveyCallbacks.java',
'**/TakeoverInAppActivity.java',
'**/TrackingDebug.java',
'**/Tweaks.java',
'**/UpdateDisplayState.java',
Expand Down
Loading

0 comments on commit 310719a

Please sign in to comment.