package  scorpio.findyourfate.com;   
 
 
import android.app.Activity; 

import android.content.Context; 
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle; 
import android.util.Log;  
import android.webkit.WebView; 
import android.widget.ImageView;  
 
public class showlink extends Activity {
 
  ShareExternalServer appUtil;
  String regId;
  String statlink;
  AsyncTask<Void, Void, String> shareRegidTask;
  WebView content,addimagetop;  
	 ImageView img;
	 int w;
	 
	 
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
   
     appUtil = new ShareExternalServer();
   
    regId = getIntent().getStringExtra("regId");
    statlink = getIntent().getStringExtra("statlink");
    Log.d("showlink", "regId: " + regId);
    Log.d("showlink", "statlink :"+statlink);
 
    final Context context = this;
    shareRegidTask = new AsyncTask<Void, Void, String>() {
      @Override
      protected String doInBackground(Void... params) {
        String result = appUtil.shareRegIdWithAppServer(context, regId,statlink);
        return result;
      }
      @Override
      protected void onPostExecute(String result) {
       shareRegidTask = null;
   //    Toast.makeText(getApplicationContext(), result,Toast.LENGTH_LONG).show();
      }
      };
    shareRegidTask.execute(null, null, null);
    
     Intent int_dr1 = new Intent(showlink.this,MainActivity.class);
     int_dr1.putExtra("REGID", regId);
     int_dr1.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
	 startActivity(int_dr1);
     }
   @Override
  public void onBackPressed() {
  finish();
   
   }
  }

   