mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Moved bulk of code to onResume()
Otherwise getCoords method is called in onCreate before locationlistener can be registered in onResume
This commit is contained in:
parent
1ecaafa3de
commit
29269f10a4
1 changed files with 12 additions and 10 deletions
|
|
@ -189,6 +189,17 @@ public class ShareActivity
|
||||||
mediaUriString = mediaUri.toString();
|
mediaUriString = mediaUri.toString();
|
||||||
ImageLoader.getInstance().displayImage(mediaUriString, backgroundImageView);
|
ImageLoader.getInstance().displayImage(mediaUriString, backgroundImageView);
|
||||||
|
|
||||||
|
|
||||||
|
if(savedInstanceState != null) {
|
||||||
|
contribution = savedInstanceState.getParcelable("contribution");
|
||||||
|
}
|
||||||
|
requestAuthToken();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
|
||||||
Log.d(TAG, "Uri: " + mediaUriString);
|
Log.d(TAG, "Uri: " + mediaUriString);
|
||||||
Log.d(TAG, "Ext storage dir: " + Environment.getExternalStorageDirectory());
|
Log.d(TAG, "Ext storage dir: " + Environment.getExternalStorageDirectory());
|
||||||
|
|
||||||
|
|
@ -198,6 +209,7 @@ public class ShareActivity
|
||||||
|
|
||||||
Log.d(TAG, "Calling GPSExtractor");
|
Log.d(TAG, "Calling GPSExtractor");
|
||||||
imageObj = new GPSExtractor(filePath, this);
|
imageObj = new GPSExtractor(filePath, this);
|
||||||
|
imageObj.registerLocationManager();
|
||||||
|
|
||||||
if (filePath != null && !filePath.equals("")) {
|
if (filePath != null && !filePath.equals("")) {
|
||||||
//Gets image coords if exist, otherwise gets last known coords
|
//Gets image coords if exist, otherwise gets last known coords
|
||||||
|
|
@ -232,16 +244,6 @@ public class ShareActivity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(savedInstanceState != null) {
|
|
||||||
contribution = savedInstanceState.getParcelable("contribution");
|
|
||||||
}
|
|
||||||
requestAuthToken();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onResume() {
|
|
||||||
super.onResume();
|
|
||||||
imageObj.registerLocationManager();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue