Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #237 from Adobe-Marketing-Cloud/wear
Browse files Browse the repository at this point in the history
Update Android Sample Apps
  • Loading branch information
shalehaha authored Nov 17, 2017
2 parents 329c991 + 569e123 commit 5371e0c
Show file tree
Hide file tree
Showing 47 changed files with 3,890 additions and 278 deletions.
1 change: 0 additions & 1 deletion samples/Android/ADBMobileSamples/.idea/.name

This file was deleted.

22 changes: 0 additions & 22 deletions samples/Android/ADBMobileSamples/.idea/compiler.xml

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions samples/Android/ADBMobileSamples/.idea/encodings.xml

This file was deleted.

23 changes: 0 additions & 23 deletions samples/Android/ADBMobileSamples/.idea/gradle.xml

This file was deleted.

43 changes: 0 additions & 43 deletions samples/Android/ADBMobileSamples/.idea/misc.xml

This file was deleted.

9 changes: 0 additions & 9 deletions samples/Android/ADBMobileSamples/.idea/modules.xml

This file was deleted.

12 changes: 0 additions & 12 deletions samples/Android/ADBMobileSamples/.idea/runConfigurations.xml

This file was deleted.

2 changes: 1 addition & 1 deletion samples/Android/ADBMobileSamples/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
buildToolsVersion '25.0.0'

defaultConfig {
applicationId "com.adobe.adbmobilesamples"
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
</intent-filter>
</activity>
<activity android:name=".target.TargetingLocationActivity" android:screenOrientation="portrait" />
<activity android:name=".target.TargetPrefetchActivity" android:screenOrientation="portrait" />
<activity android:name=".analytics.SimpleTrackingActivity" android:screenOrientation="portrait" />
<activity android:name=".gallery.GalleryActivity" android:screenOrientation="portrait" />
<activity android:name=".analytics.TimedActionsActivity" android:screenOrientation="portrait" />
Expand All @@ -41,23 +42,6 @@
<activity android:name=".messaging.InAppMessagingActivity" android:label="In-App Messages"/>
<activity android:name="com.adobe.mobile.MessageFullScreenActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" />

<!--<activity android:name=".deeplinks.ParseDeepLinkActivity">-->
<!--<intent-filter>-->
<!--<action android:name="android.intent.action.VIEW" />-->
<!--<category android:name="android.intent.category.DEFAULT" />-->
<!--<category android:name="android.intent.category.BROWSABLE" />-->
<!--&lt;!&ndash; Accepts URIs that begin with "http://www.example.com/gizmos” &ndash;&gt;-->
<!--<data android:scheme="http"-->
<!--android:host="www.example.com"-->
<!--android:pathPrefix="/gizmos" />-->
<!--&lt;!&ndash; note that the leading "/" is required for pathPrefix&ndash;&gt;-->
<!--&lt;!&ndash; Accepts URIs that begin with "example://gizmos” &ndash;&gt;-->
<!--<data android:scheme="com.adobe.example"-->
<!--android:host="gizmos" />-->

<!--</intent-filter>-->
<!--</activity>-->

<!--<activity android:name="deeplinks.ParseDeepLinkActivity">-->
<!--<intent-filter>-->
<!--<action android:name="android.intent.action.VIEW"/>-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.widget.Toast;
Expand All @@ -34,11 +33,11 @@
import com.adobe.adbmobilesamples.messaging.InAppMessagingActivity;
import com.adobe.adbmobilesamples.messaging.RegistrationIntentService;
import com.adobe.adbmobilesamples.postbacks.PostbackActivity;
import com.adobe.adbmobilesamples.target.TargetPrefetchActivity;
import com.adobe.adbmobilesamples.target.TargetingLocationActivity;
import com.adobe.mobile.*;

import java.io.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -183,6 +182,11 @@ public void targetingLocations(View view) {
startActivity(targetingIntent);
}

public void targetPrefetch(View view) {
Intent prefetchIntent = new Intent(this, TargetPrefetchActivity.class);
startActivity(prefetchIntent);
}

public void lifetimeValue(View view) {
Intent lifetimeValueIntent = new Intent(this, LifetimeValueActivity.class);
startActivity(lifetimeValueIntent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@
public class PrivacyActivity extends Activity {
private MobilePrivacyStatus currentStatus;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.privacy_example);

Config.setContext(this.getApplicationContext());
}

@Override
Expand Down Expand Up @@ -108,4 +111,4 @@ public void trackActionPrivacy(View view) {
*/
Analytics.trackAction("privacyStatusCheck", null);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class LifetimeValueActivity extends Activity {
private TextView _lblText;
private LinearLayout _layout;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
Expand All @@ -40,6 +41,8 @@ public void onCreate(Bundle savedInstanceState) {
_lblText = (TextView)findViewById(R.id.lblLifetimeValueText);
_layout = (LinearLayout)findViewById(R.id.layoutLifetimeValue);
updateLTVLabel();

Config.setContext(this.getApplicationContext());
}

@Override
Expand Down Expand Up @@ -150,4 +153,4 @@ private void updateLTVLabel() {
*/
ltvLabel.setText(String.format("%.02f", Config.getLifetimeValue()));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class MediaActivity extends Activity {
private ToggleButton _toggleTrackMilestones, _toggleSegmentMilestones, _toggleTrackOffsetMilestones,
_toggleSegmentOffsetMilestones, _toggleTrackEvery30;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
Expand All @@ -40,6 +41,8 @@ public void onCreate(Bundle savedInstanceState) {

_toggleTrackMilestones.setChecked(true);
_toggleSegmentMilestones.setChecked(true);

Config.setContext(this.getApplicationContext());
}

@Override
Expand Down Expand Up @@ -146,4 +149,4 @@ else if (_toggleTrackEvery30.isChecked()) {

startActivity(videoPlayerIntent);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@
import java.util.HashMap;

public class SimpleTrackingActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.simple_tracking);

Config.setContext(this.getApplicationContext());
}

@Override
Expand Down Expand Up @@ -105,4 +108,4 @@ public void trackAction(View view) {
*/
Analytics.trackAction("trackAction:data: button pushed", contextData);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@
import java.util.Map;

public class TimedActionsActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.timed_actions);

Config.setContext(this.getApplicationContext());
}

@Override
Expand Down Expand Up @@ -134,4 +137,4 @@ public void run() {
}
});
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@ public class VideoPlayerActivity extends Activity {
private static final String PLAYER_ID = "VideoView1";
private static final double MEDIA_LENGTH = 146;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.video_player);

Config.setContext(this.getApplicationContext());

/*
* Adobe Tracking - Media
*
Expand Down Expand Up @@ -142,4 +145,4 @@ protected void onResume() {
*/
Config.collectLifecycleData();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class ParseDeepLinkActivity extends Activity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

Config.setContext(this.getApplicationContext());
Config.collectLifecycleData(this);

Intent intent = getIntent();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,14 @@ public boolean onPreDraw() {
}
};

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.gallery);

Config.setContext(this.getApplicationContext());

_progressBar = (ProgressBar)findViewById(R.id.progressBar);

// get a reference for the potential promo banner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public class InAppMessagingActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.in_app_messages);

Config.setContext(this.getApplicationContext());
}

@Override
Expand Down Expand Up @@ -94,4 +96,4 @@ public void showLocalNotification(View view) {
exampleContextData.put("local", "notification");
Analytics.trackAction("local notification sample", exampleContextData);
}
}
}
Loading

0 comments on commit 5371e0c

Please sign in to comment.