This repository was archived by the owner on Jul 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
app/src/main/java/com/zulip/android/networking Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 4
4
import org .json .JSONObject ;
5
5
6
6
import android .app .Activity ;
7
+ import android .content .Intent ;
7
8
import android .util .Log ;
8
9
import android .widget .Toast ;
9
10
10
11
import com .zulip .android .activities .DevAuthActivity ;
11
12
import com .zulip .android .activities .LoginActivity ;
13
+ import com .zulip .android .activities .ZulipActivity ;
12
14
import com .zulip .android .util .ZLog ;
13
15
import com .zulip .android .ZulipApp ;
14
16
@@ -81,6 +83,20 @@ protected void onPostExecute(String result) {
81
83
Log .wtf ("login" , "We shouldn't have gotten this far." );
82
84
}
83
85
86
+ private void loginThroughAddRealm (JSONObject jsonObject ) {
87
+ try {
88
+ Intent intent = new Intent (context , ZulipActivity .class );
89
+ intent .putExtra ("realmName" , realmName );
90
+ intent .putExtra ("api_key" , jsonObject .getString ("api_key" ));
91
+ intent .putExtra ("email" , username );
92
+ intent .putExtra ("serverURL" , serverURL );
93
+ context .setResult (Activity .RESULT_OK , intent );
94
+ context .finish ();
95
+ } catch (JSONException e ) {
96
+ e .printStackTrace ();
97
+ }
98
+ }
99
+
84
100
@ Override
85
101
protected void onCancelled (String result ) {
86
102
super .onCancelled (result );
You can’t perform that action at this time.
0 commit comments