@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { setHasOptionsMenu(true); // setting up module moduleManager = appSession.getModuleManager(); errorManager = appSession.getErrorManager(); mNotificationsCount = moduleManager .listCryptoBrokersPendingLocalAction( moduleManager.getSelectedActorIdentity(), MAX, offset) .size(); // TODO: display unread notifications. new FetchCountTask().execute(); } catch (Exception ex) { CommonLogger.exception(TAG, ex.getMessage(), ex); errorManager.reportUnexpectedUIException( UISource.ACTIVITY, UnexpectedUIExceptionSeverity.CRASH, ex); } }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { CryptoCustomerWalletModuleManager moduleManager = ((CryptoCustomerWalletSession) appSession).getModuleManager(); walletManager = moduleManager.getCryptoCustomerWallet(appSession.getAppPublicKey()); errorManager = appSession.getErrorManager(); Object data = appSession.getData(CryptoCustomerWalletSession.LOCATION_LIST); if (data == null) { locationList = new ArrayList<>(); appSession.setData(CryptoCustomerWalletSession.LOCATION_LIST, locationList); } else { locationList = (List<String>) data; } if (locationList.size() > 0) { int pos = locationList.size() - 1; if (locationList.get(pos).equals("settings") || locationList.get(pos).equals("wizard")) { locationList.remove(pos); } } } catch (Exception ex) { Log.e(TAG, ex.getMessage(), ex); if (errorManager != null) errorManager.reportUnexpectedWalletException( Wallets.CBP_CRYPTO_BROKER_WALLET, UnexpectedWalletExceptionSeverity.DISABLES_THIS_FRAGMENT, ex); } }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { manager = ((AssetUserSession) appSession).getWalletManager(); } catch (Exception ex) { ex.printStackTrace(); } }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setHasOptionsMenu(true); intraUserSubAppSession = ((IntraUserSubAppSession) appSession); moduleManager = intraUserSubAppSession.getModuleManager(); errorManager = appSession.getErrorManager(); lstIntraUserInformations = new ArrayList<>(); }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // setting up module artistCommunityInformation = (ArtistCommunityInformation) appSession.getData(ACTOR_SELECTED); moduleManager = appSession.getModuleManager(); errorManager = appSession.getErrorManager(); artistCommunityInformations = new ArrayList<>(); }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setHasOptionsMenu(true); try { manager = ((AssetIssuerCommunitySubAppSession) appSession).getModuleManager(); errorManager = appSession.getErrorManager(); } catch (Exception ex) { ex.printStackTrace(); } }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setHasOptionsMenu(true); assetUserSession = (AssetUserSession) appSession; moduleManager = assetUserSession.getModuleManager(); errorManager = appSession.getErrorManager(); settingsManager = appSession.getModuleManager().getSettingsManager(); configureToolbar(); }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { tokenlyFanUserIdentitySubAppSession = (TokenlyFanUserIdentitySubAppSession) appSession; moduleManager = tokenlyFanUserIdentitySubAppSession.getModuleManager(); errorManager = appSession.getErrorManager(); setHasOptionsMenu(false); settingsManager = tokenlyFanUserIdentitySubAppSession.getModuleManager().getSettingsManager(); try { if (tokenlyFanUserIdentitySubAppSession.getAppPublicKey() != null) { tokenlyFanPreferenceSettings = settingsManager.loadAndGetSettings( tokenlyFanUserIdentitySubAppSession.getAppPublicKey()); } else { // TODO: Joaquin: Lo estoy poniendo con un public key hardcoded porque en este punto no // posee public key. tokenlyFanPreferenceSettings = settingsManager.loadAndGetSettings("123456789"); } } catch (Exception e) { tokenlyFanPreferenceSettings = null; } if (tokenlyFanPreferenceSettings == null) { tokenlyFanPreferenceSettings = new TokenlyFanPreferenceSettings(); tokenlyFanPreferenceSettings.setIsPresentationHelpEnabled(false); if (settingsManager != null) { if (tokenlyFanUserIdentitySubAppSession.getAppPublicKey() != null) { settingsManager.persistSettings( tokenlyFanUserIdentitySubAppSession.getAppPublicKey(), tokenlyFanPreferenceSettings); } else { settingsManager.persistSettings("123456789", tokenlyFanPreferenceSettings); } } } // if(moduleManager.getAllIntraWalletUsersFromCurrentDeviceUser().isEmpty()){ // moduleManager.createNewIntraWalletUser("John Doe", null); // } } catch (Exception ex) { errorManager.reportUnexpectedSubAppException( SubApps.TKY_FAN_IDENTITY_SUB_APP, UnexpectedSubAppExceptionSeverity.DISABLES_THIS_FRAGMENT, ex); } }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { issuerIdentitySubAppSession = (IssuerIdentitySubAppSession) appSession; moduleManager = issuerIdentitySubAppSession.getModuleManager(); errorManager = appSession.getErrorManager(); // if(moduleManager.getIdentityAssetIssuersFromCurrentDeviceUser().isEmpty()){ // moduleManager.createNewIdentityAssetIssuer("Asset Issuer John Doe", null); // } } catch (Exception ex) { CommonLogger.exception(TAG, ex.getMessage(), ex); } }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setHasOptionsMenu(true); try { redeemPointIdentitySubAppSession = (RedeemPointIdentitySubAppSession) appSession; moduleManager = redeemPointIdentitySubAppSession.getModuleManager(); errorManager = appSession.getErrorManager(); settingsManager = appSession.getModuleManager().getSettingsManager(); try { if (appSession.getAppPublicKey() != null) { redeemPointSettings = settingsManager.loadAndGetSettings(appSession.getAppPublicKey()); } } catch (Exception e) { redeemPointSettings = null; } if (redeemPointSettings == null) { redeemPointSettings = new RedeemPointSettings(); redeemPointSettings.setIsPresentationHelpEnabled(true); if (appSession.getAppPublicKey() != null) { settingsManager.persistSettings(appSession.getAppPublicKey(), redeemPointSettings); } } if (moduleManager.getIdentityAssetRedeemPoint() == null) { final RedeemPointSettings redeemPointSettingsTemp = redeemPointSettings; Handler handlerTimer = new Handler(); handlerTimer.postDelayed( new Runnable() { public void run() { if (redeemPointSettingsTemp.isPresentationHelpEnabled()) { setUpPresentation(false); } } }, 500); } } catch (Exception ex) { CommonLogger.exception(TAG, ex.getMessage(), ex); } }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { referenceWalletSession = (ReferenceAppFermatSession) appSession; errorManager = appSession.getErrorManager(); errorManager = appSession.getErrorManager(); toolbar = getToolbar(); toolbar.setNavigationIcon(getResources().getDrawable(R.drawable.cht_ic_back_buttom)); } catch (Exception e) { if (errorManager != null) errorManager.reportUnexpectedSubAppException( SubApps.CHT_CHAT, UnexpectedSubAppExceptionSeverity.DISABLES_SOME_FUNCTIONALITY_WITHIN_THIS_FRAGMENT, e); } }
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); contacts = new String[] { "Lucia Alarcon De Zamacona", "Juan Luis R. Pons", "Karina Rodríguez", "Simon Cushing", "Céline Begnis", "Taylor Backus", "Stephanie Himonidis", "Kimberly Brown" }; amounts = new String[] { "$200.00", "$3,000.00", "$400.00", "$3.00", "$45.00", "$600.00", "50.00", "$80,000.00" }; whens = new String[] { "4 hours ago", "5 hours ago", "yesterday 11:00 PM", "24 Mar 14", "3 Feb 14", "1 year ago", "1 year ago", "2 year ago" }; notes = new String[] { "New telephone", "Old desk", "Car oil", "Sandwich", "Headphones", "Computer monitor", "Pen", "Apartment in Dubai" }; totalAmount = new String[] { "$" + "17,485.00", "$" + "156,340.00", "$" + "422,545", "$" + "62,735.00", "$" + "45.00", "$" + "12,360.00", "$" + "75.00", "$" + "80,000" }; historyCount = new String[] { "9 records", "19 records", "32 records", "11 records", "1 record", "11 records", "2 records", "1 record" }; // pictures = new String[]{"luis_profile_picture", "guillermo_profile_picture", // "pedro_profile_picture", "mariana_profile_picture"}; transactions = new String[][] { {"New telephone", "Hot dog", "Telephone credit", "Coffee"}, {"Old desk", "Flat rent", "New glasses", "House in Europe", "Coffee", "Gum"}, {"Car oil", "Headphgiones", "Apartment"}, {"Sandwich", "New kitchen", "Camera repair"}, {"Headphones"}, {"Computer monitor", "New car"}, {"Pen"}, {"Apartment in Dubai"} }; transactions_amounts = new String[][] { {"$200.00", "$3.00", "$460.00", "$2.00", "$1.5"}, {"$3,000.00", "$34,200.00", "$4,500.00", "$4,000,000", "$2,00.00", "$0.50"}, {"$400,00", "$43.00", "$350,000.00"}, {"$3.00", "$55,000.00", "$7,500.00"}, {"$45.00"}, {"$600.00", "$5050.00"}, {"$50.00"}, {"$80,000.00"} }; transactions_whens = new String[][] { {"4 hours ago", "8 hours ago", "yesterday 10:33 PM", "yesterday 9:33 PM"}, {"5 hours ago", "yesterday", "20 Sep 14", "16 Sep 14", "13 Sep 14", "12 Sep 14"}, {"yesterday 11:00 PM", "23 May 14", "12 May 14"}, {"24 Mar 14", "15 Apr 14", "2 years ago"}, {"3 Feb 14"}, {"1 year ago", "1 year ago"}, {"1 year ago"}, {"2 years ago"} }; }
@Override public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreate(savedInstanceState); View layout = inflater.inflate(R.layout.contact_edit_fragment, container, false); try { // Contact cont= chatSession.getSelectedContact(); // TODO: metodo nuevo que lo buscara del module del actor // connections//chatManager.getChatUserIdentities(); for (ChatActorCommunityInformation cont : chatManager.listAllConnectedChatActor( chatManager.newInstanceChatActorCommunitySelectableIdentity( chatManager.getIdentityChatUsersFromCurrentDeviceUser().get(0)), 2000, 0)) { if (cont.getPublicKey() == chatSession.getData(ChatSession.CONTACT_DATA)) { contactname.add(cont.getAlias()); contactid.add(cont.getPublicKey()); contactalias.add(cont.getAlias()); ByteArrayInputStream bytes = new ByteArrayInputStream(cont.getImage()); BitmapDrawable bmd = new BitmapDrawable(bytes); contacticon.add(bmd.getBitmap()); ContactAdapter adapter = new ContactAdapter( getActivity(), contactname, contactalias, contactid, "edit", errorManager); // FermatTextView name =(FermatTextView)layout.findViewById(R.id.contact_name); // name.setText(contactname.get(0)); // FermatTextView id =(FermatTextView)layout.findViewById(R.id.uuid); // id.setText(contactid.get(0).toString()); // create bitmap from resource // Bitmap bm = BitmapFactory.decodeResource(getResources(), contacticon.get(0)); // set circle bitmap ImageView mImage = (ImageView) layout.findViewById(R.id.contact_image); mImage.setImageBitmap(getCircleBitmap(contacticon.get(0))); break; } } aliasET = (EditText) layout.findViewById(R.id.aliasEdit); aliasET.setText(contactalias.get(0)); saveBtn = (Button) layout.findViewById(R.id.saveContactButton); RelativeLayout contain = (RelativeLayout) layout.findViewById(R.id.containere); } catch (Exception e) { if (errorManager != null) errorManager.reportUnexpectedSubAppException( SubApps.CHT_CHAT, UnexpectedSubAppExceptionSeverity.DISABLES_SOME_FUNCTIONALITY_WITHIN_THIS_FRAGMENT, e); } toolbar.setNavigationOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { changeActivity(Activities.CHT_CHAT_OPEN_CHATLIST, appSession.getAppPublicKey()); } }); // saveBtn.setOnClickListener(new View.OnClickListener() { // @Override // public void onClick(View v) { // String aliasText = aliasET.getText().toString(); // if (TextUtils.isEmpty(aliasText)) { // return; // } // try { // for (ChatActorCommunityInformation cont: // chatManager.listAllConnectedChatActor( // (ChatActorCommunitySelectableIdentity) chatManager. // getIdentityChatUsersFromCurrentDeviceUser().get(0), 2000, // 0)) { // if (cont.getPublicKey() == // chatSession.getData(ChatSession.CONTACT_DATA)) { // cont.setAlias(aliasText); // //TODO:Cardozo revisar esta logica ya no aplica, esto viene de un // metodo nuevo que lo buscara del module del actor // connections//chatManager.getChatUserIdentities(); // //chatManager.saveContact(con); // Toast.makeText(getActivity(), "Contact Updated", // Toast.LENGTH_SHORT).show(); // //} catch (CantSaveContactException e) { // // // errorManager.reportUnexpectedSubAppException(SubApps.CHT_CHAT, // UnexpectedSubAppExceptionSeverity.DISABLES_SOME_FUNCTIONALITY_WITHIN_THIS_FRAGMENT, e); // // } // } // }catch (Exception e){ // if (errorManager != null) // errorManager.reportUnexpectedSubAppException(SubApps.CHT_CHAT, // UnexpectedSubAppExceptionSeverity.DISABLES_SOME_FUNCTIONALITY_WITHIN_THIS_FRAGMENT, e); // } // } // }); return layout; // loadDummyHistory(); // Inflate the list fragment layout // return inflater.inflate(R.layout.contact_list_fragment, container, false); }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // mIsTwoPaneLayout = getResources().getBoolean(R.bool.has_two_panes); // Let this fragment contribute menu items // setHasOptionsMenu(true); try { chatSession = ((ChatSession) appSession); chatManager = chatSession.getModuleManager(); // chatManager=moduleManager.getChatManager(); errorManager = appSession.getErrorManager(); toolbar = getToolbar(); toolbar.setNavigationIcon(getResources().getDrawable(R.drawable.cht_ic_back_buttom)); } catch (Exception e) { // CommonLogger.exception(TAG + "oncreate", e.getMessage(), e); if (errorManager != null) errorManager.reportUnexpectedSubAppException( SubApps.CHT_CHAT, UnexpectedSubAppExceptionSeverity.DISABLES_SOME_FUNCTIONALITY_WITHIN_THIS_FRAGMENT, e); } // Check if this fragment is part of a two-pane set up or a single pane by reading a // boolean from the application resource directories. This lets allows us to easily specify // which screen sizes should use a two-pane layout by setting this boolean in the // corresponding resource size-qualified directory. // mIsTwoPaneLayout = getResources().getBoolean(R.bool.has_two_panes); // Let this fragment contribute menu items // setHasOptionsMenu(true); // Create the main contacts adapter // mAdapter = new ContactsAdapter(getActivity()); // // if (savedInstanceState != null) { // // If we're restoring state after this fragment was recreated then // // retrieve previous search term and previously selected search // // result. // mSearchTerm = savedInstanceState.getString(SearchManager.QUERY); // mPreviouslySelectedSearchItem = // savedInstanceState.getInt(STATE_PREVIOUSLY_SELECTED_KEY, 0); // } /* * An ImageLoader object loads and resizes an image in the background and binds it to the * QuickContactBadge in each item layout of the ListView. ImageLoader implements memory * caching for each image, which substantially improves refreshes of the ListView as the * user scrolls through it. * * To learn more about downloading images asynchronously and caching the results, read the * Android training class Displaying Bitmaps Efficiently. * * http://developer.android.com/training/displaying-bitmaps/ */ // mImageLoader = new ImageLoader(getActivity(), getListPreferredItemHeight()) { // @Override // protected Bitmap processBitmap(Object data) { // // This gets called in a background thread and passed the data from // // ImageLoader.loadImage(). // return loadContactPhotoThumbnail((String) data, getImageSize()); // } // }; // // // Set a placeholder loading image for the image loader // mImageLoader.setLoadingImage(R.drawable.ic_contact_picture_holo_light); // Add a cache to the image loader // mImageLoader.addImageCache(getActivity().getSupportFragmentManager(), 0.1f); }