So I decided to yield(for now) and re-write my code around the problem. Effectively, updates will only be handled for a registered app. They will not he handled for the first session of the app where registration is carried. They will only be handled for subsequent app sessions thereafter. See attached code.
//Check for updates
try {
JSONObject json = new JSONObject(aPacket.getUTF8());
if(json.getString("mod").equals("notify")){
try {
//Check for bearer to determine if app is logged in
if(packet_handler.getBearer() != null){
handleNotify(json);
}
} catch (RecordStoreException ex) {
ex.printStackTrace();
}
}
} catch (JSONException ex) {
ex.printStackTrace();
}
P/S: Update is handled according to Chinedu's prescribed handling techniques i.e for version x.y.z
where..
x denotes major release hence force an update(no grace. App timeout&exit after 100 secs)
y denotes a feature release hence ask user to update(10 sec grace applied on screen)
z denotes a bug fix hence ask user to update(10 sec grace applied on screen)
No comments:
Post a Comment