Ignore:
Timestamp:
2014-08-14T14:52:48+12:00 (10 years ago)
Author:
ak19
Message:

Tidy up on how the .loc and .json files are found

Location:
other-projects/tipple-android/tipple-lib/src/org/greenstone/android/tipple/base
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • other-projects/tipple-android/tipple-lib/src/org/greenstone/android/tipple/base/AudioPlayerView.java

    r26899 r29186  
    145145               
    146146                // the location is kinda hardcoded.... if you do relocate where these files are stored, fix this file:/// url thing as well
    147                 i.setDataAndType( Uri.parse("file:///sdcard/tipple-store/geodata/hamilton.json"), "application/mixare-json" );
     147                i.setDataAndType( Uri.parse("file:///sdcard/tipple-store/geodata/" + TippleActivity.DEFAULT_LOC_FILE + ".json"), "application/mixare-json" );
    148148                getContext().startActivity(i);
    149149               
  • other-projects/tipple-android/tipple-lib/src/org/greenstone/android/tipple/base/TippleActivity.java

    r26899 r29186  
    5151    enum TextAudioModeEnum { TEXT_ONLY, TEXT_PLUS_AUDIO, AUDIO_ONLY, AUDIO_PLUS_TEXT };
    5252   
    53     /*
    54      * GPS coords point to ==> uni rec centre
    55      * TODO: Rather than hardcode a "starting point" location as shown below, get the last
    56      * known location of the user.
    57      */
    58    
    59    
    60     private static final double DEFAULT_NO_GPS_LONGITUDE = 175.3141;
    61     private static final double DEFAULT_NO_GPS_LATITUDE = -37.7876;
    6253
    6354   
     
    10293   
    10394    public static String DEFAULT_LOC_FILE = "hamilton";
     95    //public static String DEFAULT_LOC_FILE = "fieldays";
     96   
     97    /*
     98     * GPS coords point to ==> uni rec centre
     99     * TODO: Rather than hardcode a "starting point" location as shown below, get the last
     100     * known location of the user.
     101     */
     102   
     103   
     104    // University ??
     105    private static final double DEFAULT_NO_GPS_LONGITUDE = 175.3141;
     106    private static final double DEFAULT_NO_GPS_LATITUDE = -37.7876;
     107
     108    // Mystery creek -- centre of fieldays innovation tent
     109    //private static final double DEFAULT_NO_GPS_LONGITUDE = 175.355012;
     110    //private static final double DEFAULT_NO_GPS_LATITUDE = -37.872816;
    104111   
    105112    public static String getGeodataDirectory()
     
    475482                   
    476483                    // now TTS initialized, init TTS aware place-locations
    477                     String loc_filename = geodataDirectory + "hamilton.loc";
     484                    String loc_filename = geodataDirectory + DEFAULT_LOC_FILE + ".loc";
    478485                    System.err.println("*** loc filename = " + loc_filename);
    479486                   
Note: See TracChangeset for help on using the changeset viewer.