[TIMOB-9139] Android: Tooling: How to set the deploytype
GitHub Issue | n/a |
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-10-19T01:19:59.000+0000 |
Affected Version/s | Release 2.0.1 |
Fix Version/s | 2013 Sprint 21, 2013 Sprint 21 Core, Release 3.2.0 |
Components | Android, Tooling |
Labels | SupportTeam, androidbuild, ay-verified, cb-verified, core, exalture, hard_to_verify, qe-closed-3.2.0 |
Reporter | Mauro Parra-Miranda |
Assignee | Chris Barber |
Created | 2012-05-15T09:44:52.000+0000 |
Updated | 2013-12-17T21:18:37.000+0000 |
Description
Problem Description
When you do a deployment for distribution, you will think that the deploytype in analytics will switch to production. But it's not happening with some projects. A customer is not getting analytics from his app, and he reported it, the people in the Cloud replied that he didn't set the app to be in prod:
The second issue, for the other app GUID 473b9203-836a-4d48-ac13-2993873efa2c, the problem is that the user is using deploytype:test, and analytics only shows up for deploytype:production.
When I asked the client to do for production (i.e., deploy it to the Market), he already did that, as the attached image shows.
Actual Results
App is not set for production in the deploytype.
Expected results
If you build an app for distribution in the market, the deploytype should be production.
Extra info
See attached image.
Attachments
Some background on how the deploytype is set via build scripts: * User chooses "Distribute - Android Marketplace" in titanium studio and fills out the form. * Studio calls the android builder.py with the ["distribute" command](https://github.com/appcelerator/titanium_mobile/blob/2_0_X/support/android/builder.py#L2126). * builder.py's
build_and_run
function is called with theinstall
argument set toTrue
. That - and the fact that the keystore information is also passed to builder - lead thedeploy_type
to be set toproduction
. ([code](https://github.com/appcelerator/titanium_mobile/blob/2_0_X/support/android/builder.py#L1663)). * That information is then used when we generate the Java source for the application's "AppInfo" class. [My test app here](https://skitch.com/bill_dawson/84mm2/tistud1659appinfo.java-projects-ti-tistud1659-build-android-gen-com-billdawson-tistud1659-vim3). That sets the system "ti.deploytype" property for the application at runtime. * Then, when analytics is fired up at runtime, that "ti.deploytype" property [is read and sent along](https://github.com/appcelerator/titanium_mobile/blob/2_0_X/android/titanium/src/java/org/appcelerator/titanium/TiApplication.java#L407) with the analytics data.Mauro--it appears that
This should be working correctly
The choice of deploy type is actually done inside the SDK scripts. There isn't anything Studio can do about it (in the code Bill links to, deploy type is not a parameter that's passed in).
Have you replicated this yourself? If you have, it appears it should be a TIMOB issue.This is changing to TI mobile SDK, so they can give us their opinion.
@Mauro - Have you reproduced this issue yourself? All the issues that come from support team should have been verified? Why is this issue in the escalation list?
Changing priority to next patch, working on a testcase. Best, Mauro
In the new CLI, the deploy can be set with the --deploy-type flag. When building for distribution, it can only have a deploy-type of production.
PR: https://github.com/appcelerator/titanium_mobile/pull/4781
Verified fixed on: Mac OSX 10.9 Mavericks Titanium Studio, build: 3.2.0.201312162209 Titanium SDK, build: 3.2.0.v20131216191854 CLI: 3.2.0-cr3 Alloy: 1.3.0-cr CLI Android: --deploy-type can be set to test and development. --target can be set to dist-playstore for production. Production will override any --deploy-type parameters. Studio has package and run buttons which sort all this out for you successfully. Closing.