[TIMOB-15306] TiStudio: Application hangs on splash screen when going from the Debug "Titanium Android on Device" build of the app to the "Titanium App Store Distribution" build of the app.
GitHub Issue | n/a |
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2014-01-07T19:03:27.000+0000 |
Affected Version/s | Release 3.0.2, Release 3.1.0 |
Fix Version/s | Release 3.2.0 |
Components | Android, Tooling |
Labels | supportTeam |
Reporter | Rupesh Sharma |
Assignee | Chris Barber |
Created | 2013-04-17T11:12:16.000+0000 |
Updated | 2017-03-22T20:44:31.000+0000 |
Description
Description
Application hangs on splash screen when going from the Debug "Titanium Android on Device" build of the app to the "Titanium App Store Distribution" build of the app.
Steps to reproduce
1. Publish the sample app using the "Titanium App Store Distribution" option and install the generated apk file onto an android device.
2. Run the application, you should see screen.
3. Uninstall the sample app.
4. From Titanium select the Debug "Titanium Android on Device" option.
5. Run the application once it is installed and you should see the screen.
6. Stop the debugger and uninstall the sample app.
7. Reinstall the published apk from step 1.
8. Run the application, it will now hang at the splash screen.
Note:Once this happens the only way to get the published version of the app to work again is to completely reset the android device.
Please find the attached sample project.
Attachments
File | Date | Size |
Simple.zip | 2013-04-17T11:12:16.000+0000 | 3694594 |
Yeah, I'm experiencing exactly the same thing. Thought I was going to publish the app, blocked because the .apk built version hangs forever on splash without logging anything in particular. (Using TiMobile SDK: 3.1.0.GA)
Figured out the solution: the 'hang' happens as the app is *waiting for the debugger* to connect - when "Debug - Install on device" is used, in one of the build steps, a
deploy.json
is planted somewhere on the device (e.g. /sdcard/{appId}/) where it is not affected by "Uninstall app"/"Clear data" etc*!* Typical deploy.json:Quick fix for making the device usable for .apk testing again: Alt.1: connect the device and select Run (*not* Debug) -> Titanium Android on Device ... This should create a non-debuggy .json file Alt.2: open ${ANDROID_SDK_ROOT}/tools/monitor, connect to device by USB-cable, File Explorer tab, browse to the {appId} folder and manually delete
deploy.json
I don't think we can properly fix this without changing how deploy.json is loaded. Instead of putting the file on the sdcard, it would be better to put it in the apk so that when an app is uninstalled, it will take the debug settings with it. I don't know what changes would be required in the Android code to support this. As far as the Android build is concerned, the only changes required is writing the deploy.json into the app build dir and remove the adb push call.
Closing ticket as duplicate of the ticket that is mentioned above and has since been closed.