Android Open Source - RFID_ME_GUI_APP F R A G_ Web

From Project

Back to project page RFID_ME_GUI_APP.


The source code is released under:

%PDF-1.4 %???? 39 0 obj <</Length 2480 /Subtype /XML /Type /Metadata >> stream <?xpacket begin='?' id='W5M0MpCehiHzreSzNTczkc9d'?> <x:xmpmeta x:xmptk="3.1-701" xmlns:x="adobe:ns:meta/"> <rdf:RDF x...

If you think the Android project RFID_ME_GUI_APP listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.mti.rfid.minime;
/*w w w .  j a va 2s .  c  o m*/
import org.apache.http.util.EncodingUtils;

import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class FRAG_Web extends Fragment {
  private WebView wvContant;
  public static FRAG_Web newInstance(int index, String tagId) {
    FRAG_Web f = new FRAG_Web();
    Bundle args = new Bundle();
    args.putInt("index", index);
    args.putString("tagid", tagId);
    return f;
  private int getShownIndex() {
    return getArguments().getInt("index", 0);
  private String getTagId() {
    return getArguments().getString("tagid");

  public void onCreate(Bundle savedInstanceState) {

  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        SharedPreferences mSharedpref = PreferenceManager.getDefaultSharedPreferences(getActivity().getApplicationContext());
      final String prefixUrl = mSharedpref.getString("cfg_web_url", "");
    View view = inflater.inflate(R.layout.frag_web, container, false);
    wvContant =(WebView) view.findViewById(;
        WebSettings webSettings = wvContant.getSettings();
        wvContant.setWebViewClient(new WebViewClient(){
      public void onPageFinished(WebView view, String url) {
        super.onPageFinished(view, url);

//        if(prefixUrl.contains("?")) {            // #### GET  ####
          wvContant.loadUrl(prefixUrl + getTagId());
//        } else {                      // #### POST ####
//          wvContant.postUrl(prefixUrl, EncodingUtils.getBytes("epc=" + getTagId(), "BASE64"));
//        }
    return view;

Java Source Code List