« first day (250 days earlier)      last day (223 days later) » 

05:53
@victor how to restart the oncreate activity programmatically after force stop the application
@Cathy after force you will launch your app again right
yep
then use onResume
yep i used
@Cathy then ?
05:58
@victor it is working according to life cycle activity but the thing is it is unable to get the respose
@victor it is coming when we turned off the wifi and force stop the app and again turn on the wifi
@Cathy just check which acitivity is calling after launching when force stop either onResume or onCreate
oncrete
@Victor onResume is working correct
@Cathy then why dont write your code in onResume ?
the rift is coming when we turned off the wifi and force stop the app
open the app to check the app and again turn on the wifi the oncreate activity is unable to get the response from server sync
@victor
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTheme(R.style.NaturalGrey);

// Setting screen always active mode to avoid tablet going to sleep mode
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);


// Setting Layout for this activity
setContentView(R.layout.main);
resources = getResources();
context = this;
}
since it is already created and later you are turning on the wifi it might not going into oncreate i think ?
06:07
from below code we need to get the response
public String getCentralServer(Context context, String serial_number) throws Exception{
// TODO Auto-generated method stub
WebServiceClient client = new WebServiceClient(Constants.GET_CENTRAL_SERVER);
client.addParam("accesscode", String.valueOf(serial_number));
client.addParam("type", "2");
client.Execute(RequestMethod.GET);
String response = client.getResponse();
if (response != null){
response = response.replaceAll("\\\\/", "/");
response = response.replace("\"", "");
@Cathy ask in that room . there are seniors
@Cathy ask @P
@Cathy ask pallavi to help
since it is already created and later you are turning on the wifi it might not going into oncreate i think ?
yes it is correct what is solution
@Cathy when ever wifi turned on how do know that wifi is on ?
if it is a method take a boolean variable over there
@victor
public boolean isWifiAvailable() {

ConnectivityManager connMgr = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE);

android.net.NetworkInfo wifi = connMgr.getNetworkInfo(ConnectivityManager.TYPE_WIFI);

if (wifi != null && wifi.isAvailable()) {
return true;

} else {
return false;
}

}
public void onCreate() {
super.onCreate();

createAppFolders();

String DownloadUrl = "http://example.com/android/timeclock.db";
String fileName = "timeclock.db";

DownloadDatabase(DownloadUrl,fileName);

ServerSync serverSync = new ServerSync();

String serial_number = Util.getDeviceUniqueIdentifier(this);

Log.i("Device_Secure_Id", "Id : " + serial_number + " , Device Id : " + Constants.DEVICE_ID);

try {

if (Constants.DEVICE_ID == 0) {
String accounts_service = serverSync.getCentralServer(this,serial_number);
dis code in controller
@Cathy idhi okasare check chesukuntadi so adhe ni problem
06:13
kadu since it is already created and later you are turning on the wifi it might not going into oncreate idi na prob
force stop chesina taruvata
@Cathy isWifenabled force stop chesi malli app run chesaka malli kasepu agi wifi off cheste value vastuda?
i mean nuvu epudu wifi enable/disable chesina aa function loki veltunda ?
ha wifi on lo unapude force stop chesi app open cheste bane work awtundi mali wifi off chesi open chesina bane workawtundi
@Cathy wifi method loki veltunda pratisari ?
issue daniki vice versa chesinapudu vastundi
@Victor yep
we have set a method to check whether it is connecting or not and it is working only
@Cathy hey you should not use service to check wifi ?
06:17
@Victor wich service
background service
iswifiavailable dagra na
yes
@Victor reason nduku use cheyakudadu
according to our project service has to check continuously dats the reason we used dat
@Cathy yes anthe ga mari lekapothe wifi on aynapudu service ni pause chesukovachu ga
06:24
@victor means
@oka service ni run cheyandi adhi wifi state no check chesukuntadhi
wifi on aythe adhii stop avali
wifi off aythe wifi on ayndho ledho checkchesukovadam kosam mali run avtundhi
@Cathy niku aa answer correct kada
07:19
@Victor kadu

« first day (250 days earlier)      last day (223 days later) »