Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: Update APSAnalytics #10008

Merged
merged 5 commits into from Jun 28, 2018
Merged

Conversation

garymathews
Copy link
Contributor

@garymathews garymathews commented Apr 19, 2018

  • Include @whitfin's Titanium SDK changes after refactoring APSAnalytics
  • Fix Ti.Platform.architecture and Ti.Platform.ostype
  • Update aps-analytics.jar

Test code sample:
app.js

var win = Ti.UI.createWindow({layout: 'vertical'}),
	button1 = Ti.UI.createButton({title: 'nav - no'}),
	button2 = Ti.UI.createButton({title: 'nav - yes'}),
	button3 = Ti.UI.createButton({title: 'nav - offline'}),
	button4 = Ti.UI.createButton({title: 'feat - no'}),
	button5 = Ti.UI.createButton({title: 'feat - yes'}),
	button6 = Ti.UI.createButton({title: 'feat - offline'}),
	button7 = Ti.UI.createButton({title: 'opt out/in'});

button1.addEventListener('click', function () {
	Ti.Analytics.navEvent('from', 'to', 'nav event opted out');
});
button2.addEventListener('click', function () {
	Ti.Analytics.navEvent('from', 'to', 'nav event not opted out');
});
button3.addEventListener('click', function () {
	Ti.Analytics.navEvent('from', 'to', 'nav event offline');
});
button4.addEventListener('click', function () {
	Ti.Analytics.featureEvent('feat no');
});
button5.addEventListener('click', function () {
	Ti.Analytics.featureEvent('feat yes');
});
button6.addEventListener('click', function () {
	Ti.Analytics.featureEvent('feat offline');
});
button7.addEventListener('click', function() {
	if (Ti.Analytics.getOptedOut()) {
		Ti.Analytics.optedOut = false;
		alert('Opted out set to FALSE');
	} else {
		Ti.Analytics.setOptedOut(true);
		alert('Opted out set to TRUE');
	}
});
win.add([button1, button2, button3, button4, button5, button6, button7])
win.open();

@build
Copy link
Contributor

build commented Apr 19, 2018

Fails
🚫

Tests have failed, see below for more information.

Warnings
⚠️

There is no linked JIRA ticket in the PR body. Please include the URL of the relevant JIRA ticket. If you need to, you may file a ticket on JIRA

Messages
📖

👍 Hey!, You deleted more code than you added. That's awesome!

Tests:

Classname Name Time Error
ios.console #timeEnd 0.001 file:///Users/build/Library/Develo
ios.console #time 0.003 file:///Users/build/Library/Develo
ios.Error Native exception surfaced 0.003 file:///Users/build/Library/Developer/CoreSimulator/Devices/A4DAAE86-E11B-4976-B0DE-69E11B3356DC/data
ios.Titanium.Analytics .optedOut 0.001 file:///Users/build/Library/Devel
ios.Titanium.App Multiple global event listeners (TIMOB-25836) 0.002 [native code]
file:///Users/build/Library/Developer/CoreSimulator/Devices/A4DA
ios.Titanium.Media.VideoPlayer Release video player and close window (TIMOB-26033) 10.016 file:///Users/build/Librar
ios.Titanium.Media.VideoPlayer showsControls 0.001 file:///Users/build/Libr
ios.Titanium.Media.VideoPlayer volume 0.001 file:///Users/build/
ios.Titanium.UI #convertUnits() returns 25.4 mm = dpi pixels 0.001 file:///Users/build/Library/Developer/CoreS
ios.Titanium.UI #convertUnits() converts 1 in = dpi pixels 0 file:///Users/build/Libr
ios.Titanium.UI #convertUnits() returns Ti.Platform.DisplayCaps.logicalDensityFactory for 1dip to pixels 0 file:///Users/build/Library/Developer/
ios.Titanium.UI #convertUnits() returns 2.54cm = dpi pixels 0 file:///Users/build/Library/Developer/CoreS
ios.Titanium.UI #convertUnits() converts 100 unspecified units to px 0 file:///Users/build/Library/Developer/Core
ios.Titanium.UI.iOS #constants 0.004 file:///Users/build/Library/Deve
ios.Titanium.UI.iOS.NavigationWindow .navigationWindow 10.007 file:///Users/build/Librar
ios.Titanium.UI.MaskedImage createMaskedImage 0.001 file:///Users/build/Library/D
ios.Titanium.UI.View backgroundGradient (linear) 10.003 file:///Users/build/Librar
ios.Titanium.UI.View backgroundGradient (radial) 10.006 file:///Users/build/Librar
ios.Titanium.UI.WebView .zoomLevel 10.005 file:///Users/build/Librar

Generated by 🚫 dangerJS

@@ -228,7 +237,44 @@ public boolean openURL(String url)
public String getMacaddress()
// clang-format on
{
return TiPlatformHelper.getInstance().getMacaddress();
// String macaddr = null;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should deprecate this, on Android 6.0+ the MAC address will always return 02:00:00:00:00:00

@sgtcoolguy
Copy link
Contributor

Closing as per @garymathews

@sgtcoolguy sgtcoolguy closed this May 23, 2018
@ypbnv ypbnv reopened this Jun 15, 2018
@ypbnv
Copy link
Contributor

ypbnv commented Jun 15, 2018

Reopened for combining with the refactored aps_analytics library.

@build
Copy link
Contributor

build commented Jun 15, 2018

Warnings
⚠️

There is no linked JIRA ticket in the PR body. Please include the URL of the relevant JIRA ticket. If you need to, you may file a ticket on JIRA

Messages
📖

👍 Hey!, You deleted more code than you added. That's awesome!

📖

💾 Here's the generated SDK zipfile.

Generated by 🚫 dangerJS

@ypbnv
Copy link
Contributor

ypbnv commented Jun 20, 2018

Pushed the aps-analytics.jar version containing optOut option and refactoring. Added the code sample I used for basic testing.

@garymathews
Copy link
Contributor Author

Up-to date with aps_sdk, merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants