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
@@ -79,6 +81,20 @@ protected void onPostExecute(String result) {
79
81
Log .wtf ("login" , "We shouldn't have gotten this far." );
80
82
}
81
83
84
+ private void loginThroughAddRealm (JSONObject jsonObject ) {
85
+ try {
86
+ Intent intent = new Intent (context , ZulipActivity .class );
87
+ intent .putExtra ("realmName" , realmName );
88
+ intent .putExtra ("api_key" , jsonObject .getString ("api_key" ));
89
+ intent .putExtra ("email" , username );
90
+ intent .putExtra ("serverURL" , serverURL );
91
+ context .setResult (Activity .RESULT_OK , intent );
92
+ context .finish ();
93
+ } catch (JSONException e ) {
94
+ ZLog .logException (e );
95
+ }
96
+ }
97
+
82
98
@ Override
83
99
protected void onCancelled (String result ) {
84
100
super .onCancelled (result );
You can’t perform that action at this time.
0 commit comments