public static void addAppPage(CustomAppPage page) { lock (appPages) { appPages.Add(page.sessionId, page); } }
public void onAppAccept(string session_id) { byte[] b_session_id = Crypto.stringToHash(session_id); if (VoIPManager.hasSession(b_session_id)) { VoIPManager.acceptCall(b_session_id); return; } CustomAppPage app_page = Node.customAppManager.acceptAppRequest(b_session_id); if (app_page != null) { Navigation.PushAsync(app_page, Config.defaultXamarinAnimations); }// TODO else error? }
public void onApp(string app_id) { byte[][] user_addresses = new byte[][] { friend.walletAddress }; CustomAppPage custom_app_page = new CustomAppPage(app_id, IxianHandler.getWalletStorage().getPrimaryAddress(), user_addresses, Node.customAppManager.getAppEntryPoint(app_id)); custom_app_page.accepted = true; Node.customAppManager.addAppPage(custom_app_page); Xamarin.Forms.Device.BeginInvokeOnMainThread(() => { Navigation.PushAsync(custom_app_page, Config.defaultXamarinAnimations); }); StreamProcessor.sendAppRequest(friend, app_id, custom_app_page.sessionId); }