Allow simulator input ip address
This commit is contained in:
parent
179a95e2de
commit
271a70bc4b
@ -171,9 +171,6 @@ public class DoricDevActivity extends AppCompatActivity implements DoricDev.Stat
|
||||
tvInput.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View clickView) {
|
||||
if (DoricDev.getInstance().isRunningInEmulator) {
|
||||
DoricDev.getInstance().connectDevKit("ws://" + "10.0.2.2" + ":7777");
|
||||
} else {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(DoricDevActivity.this, R.style.Theme_Doric_Modal_Prompt);
|
||||
builder.setTitle("Please input devkit ip");
|
||||
View v = LayoutInflater.from(DoricDevActivity.this).inflate(R.layout.doric_modal_prompt, null);
|
||||
@ -200,7 +197,6 @@ public class DoricDevActivity extends AppCompatActivity implements DoricDev.Stat
|
||||
});
|
||||
builder.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
tvDisconnect.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -302,11 +302,6 @@ - (void)disconnect {
|
||||
}
|
||||
|
||||
- (void)input {
|
||||
if (self.isSimulator) {
|
||||
NSString *result = @"127.0.0.1";
|
||||
[[DoricDev instance] connectDevKit:[NSString stringWithFormat:@"ws://%@:7777", result]];
|
||||
ShowToast([NSString stringWithFormat:@"Connecting to %@", result], DoricGravityBottom);
|
||||
} else {
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Please input devkit ip"
|
||||
message:@""
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
@ -334,7 +329,6 @@ - (void)input {
|
||||
|
||||
[self presentViewController:alert animated:YES completion:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)scan {
|
||||
if (self.isSimulator) {
|
||||
|
Reference in New Issue
Block a user