- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我在从程序中检索正确值时遇到问题。我目前正在使用 startService 以便从服务类启动计时器并能够从我的 mainActivity 类关闭它。我使用的示例激活类中的计时器,似乎工作得很好,但问题是我无法从 mainActivity 类中关闭它。
PS。我在我的程序中使用 EPOC+ EEG 耳机。这是我的 Activity 训练课
import java.util.ArrayList;
import java.util.Timer;
import java.util.TimerTask;
public class ActivityTraining extends Activity implements EngineInterface {
EngineConnector engineConnector;
Spinner spinAction;
Button btnTrain, btnClear;
ProgressBar progressBarTime,progressPower;
AdapterSpinner spinAdapter;
ImageView imgBox;
ArrayList<DataSpinner> model = new ArrayList<DataSpinner>();
int indexAction, _currentAction,userId=0,count=0;
Timer timer;
TimerTask timerTask;
float _currentPower = 0;
float startLeft = -1;
float startRight = 0;
float widthScreen = 0;
boolean isTraining =false;
ArrayList<Song> songList;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_trainning);
engineConnector = EngineConnector.shareInstance();
engineConnector.delegate = this;
init();
songList = (ArrayList<Song>) getIntent()
.getSerializableExtra(MusicPhoneUtils.SONG_LIST_INTENT);
Log.d("ActivityTraining", "GOT SONG COUNT = " + songList.size());
}
public void init() {
spinAction=(Spinner)findViewById(R.id.spinnerAction);
btnTrain=(Button)findViewById(R.id.btstartTraing);
btnClear=(Button)findViewById(R.id.btClearData);
btnClear.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
switch (indexAction){
case 0:
engineConnector.trainningClear(IEmoStateDLL.IEE_MentalCommandAction_t.MC_NEUTRAL.ToInt());
break;
case 1:
engineConnector.trainningClear(IEmoStateDLL.IEE_MentalCommandAction_t.MC_PUSH.ToInt());
break;
case 2:
engineConnector.trainningClear(IEmoStateDLL.IEE_MentalCommandAction_t.MC_PULL.ToInt());
break;
case 3:
engineConnector.trainningClear(IEmoStateDLL.IEE_MentalCommandAction_t.MC_LEFT.ToInt());
break;
case 4:
engineConnector.trainningClear(IEmoStateDLL.IEE_MentalCommandAction_t.MC_RIGHT.ToInt());
break;
default:
break;
}
}
});
progressBarTime=(ProgressBar)findViewById(R.id.progressBarTime);
progressBarTime.setVisibility(View.INVISIBLE);
progressPower=(ProgressBar)findViewById(R.id.ProgressBarpower);
imgBox = (ImageView)findViewById(R.id.imgBox);
setDataSpinner();
spinAction.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
indexAction = arg2;
}
public void onNothingSelected(AdapterView<?> arg0) {
//TODO Auto-genereted method stub
}
});
这是我调用服务类来启动
Intent strtService = new Intent().setClass(getApplicationContext(), StartEndEpocService.class);
startService(strtService);
这是原始计时器所在的位置
Timer timeListenAction = new Timer();
timeListenAction.scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {
handlerUpdateUI.sendEmptyMessage(1);
}
}, 0, 20);
}
从 Service 类调用连接方法,将值传递给 handlerUpdateUI
public void connect() {
handlerUpdateUI.sendEmptyMessage(1);
}
Handler handlerUpdateUI = new Handler(){
public void handleMessage(Message msg) {
switch (msg.what){
case 0:
count++;
int trainninTime = (int)MentalCommandDetection.IEE_MentalCommandGetTrainingTime(userId)[1]/1000;
if(trainninTime>0){
progressBarTime.setProgress(count/trainninTime);
}
if (progressBarTime.getProgress()>=100){
timerTask.cancel();
timer.cancel();
}
break;
case 1:
changePages();
default:
break;
}
};
};
public void startTrainingMentalcommand(IEmoStateDLL.IEE_MentalCommandAction_t MentalCommandAction) {
isTraining = engineConnector.startTrainingMetalcommand(isTraining, MentalCommandAction);
btnTrain.setText((isTraining) ? "Abort Trainning" : "Train");
}
public void setDataSpinner(){
model.clear();
DataSpinner data = new DataSpinner();
data.setTvName("Neutral");
data.setChecked(engineConnector.checkTrained(IEmoStateDLL.IEE_MentalCommandAction_t.MC_NEUTRAL.ToInt()));
model.add(data);
data = new DataSpinner();
data.setTvName("Push");
data.setChecked(engineConnector.checkTrained(IEmoStateDLL.IEE_MentalCommandAction_t.MC_PUSH.ToInt()));
model.add(data);
data = new DataSpinner();
data.setTvName("Pull");
data.setChecked(engineConnector.checkTrained(IEmoStateDLL.IEE_MentalCommandAction_t.MC_PULL.ToInt()));
model.add(data);
data=new DataSpinner();
data.setTvName("Left");
data.setChecked(engineConnector.checkTrained(IEmoStateDLL.IEE_MentalCommandAction_t.MC_LEFT.ToInt()));
model.add(data);
data=new DataSpinner();
data.setTvName("Right");
data.setChecked(engineConnector.checkTrained(IEmoStateDLL.IEE_MentalCommandAction_t.MC_RIGHT.ToInt()));
model.add(data);
spinAdapter = new AdapterSpinner(this, R.layout.row, model);
spinAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);
spinAction.setAdapter(spinAdapter);
}
@Override
public boolean onCreateOptionMenu(Menu menu){
getMenuInflater().inflate(R.menu.activity_trainning, menu);
return true;
}
public void TimerTask(){
count = 0;
timerTask = new TimerTask() {
@Override
public void run() {
handlerUpdateUI.sendEmptyMessage(0);
}
};
}
private void changePages() {
//currentAction(_currentAction, _currentPower);
float power = _currentPower;
Log.e("ActivityTraining", "current_action: " + _currentAction);
Log.e("ActivityTraining", "power: " + power);
if ((_currentAction == IEmoStateDLL.IEE_MentalCommandAction_t.MC_PUSH.ToInt() && power > 0)) {
Log.e("ActivityTraining", "current_action: " + _currentAction);
Log.e("ActivityTraining", "power: " + power);
Intent MC_RIGHT = new Intent().setClass(getApplicationContext(), FragmentBondActivity.class);
MC_RIGHT.putExtra(MusicPhoneUtils.SONG_LIST_INTENT, songList);
MC_RIGHT.putExtra(MusicPhoneUtils.START_AUTO_PLAY_INTENT, false);
MC_RIGHT.putExtra(MusicPhoneUtils.LAST_SONG_USER_PLAYED_INTENT,
getIntent().getSerializableExtra(MusicPhoneUtils.LAST_SONG_USER_PLAYED_INTENT));
MC_RIGHT.putExtra("target", "play");
startActivity(MC_RIGHT);
}
if (((_currentAction == IEmoStateDLL.IEE_MentalCommandAction_t.MC_LEFT.ToInt())) && power > 0) {
Log.e("ActivityTraining", "current_action: " + _currentAction);
Log.e("ActivityTraining", "power: " + power);
Intent MC_LEFT = new Intent().setClass(getApplicationContext(),FragmentBondActivity.class);
MC_LEFT.putExtra(MusicPhoneUtils.SONG_LIST_INTENT, songList);
MC_LEFT.putExtra("target", "songList");
startActivity(MC_LEFT);
}
if(((_currentAction == IEmoStateDLL.IEE_MentalCommandAction_t.MC_RIGHT.ToInt())) && power > 0) {
Log.e("ActivityTraining", "current_action: " + _currentAction);
Log.e("ActivityTraining", "power: " + power);
Intent MC_RIGHT = new Intent().setClass(getApplicationContext(), SettingsActivity.class);
startActivity(MC_RIGHT);
}
if(((_currentAction == IEmoStateDLL.IEE_MentalCommandAction_t.MC_PULL.ToInt())) && power > 0) {
Log.e("ActivityTraining", "current_action: " + _currentAction);
Log.e("ActivityTraining", "power: " + power);
Intent MC_PULL = new Intent().setClass(getApplicationContext(), MainActivity.class);
MC_PULL.putExtra(MusicPhoneUtils.SONG_LIST_INTENT, songList);
MC_PULL.putExtra("target", "songList");
startActivity(MC_PULL);
}
}
public void enableClick() {
btnClear.setClickable(true);
spinAction.setClickable(true);
}
@Override
public void userAdd(int userId) {
// TODO Auto-generated method stub
this.userId=userId;
}
@Override
public void userRemoved() {
// TODO Auto-generated method stub
}
@Override
public void trainStarted() {
// TODO Auto-generated method stub
progressBarTime.setVisibility(View.VISIBLE);
btnClear.setClickable(false);
spinAction.setClickable(false);
timer = new Timer();
TimerTask();
timer.schedule(timerTask , 0, 10);
}
@Override
public void trainSucceed() {
// TODO Auto-generated method stub
progressBarTime.setVisibility(View.VISIBLE);
btnTrain.setText("Train");
enableClick();
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
ActivityTraining.this);
// set title
alertDialogBuilder.setTitle("Training Succeeded");
// set dialog message
alertDialogBuilder
.setMessage("Training is successful. Accept this training?")
.setCancelable(false)
.setIcon(R.drawable.ic_launcher)
.setPositiveButton("Yes",
new DialogInterface.OnClickListener() {
public void onClick(
DialogInterface dialog,int which) {
engineConnector.setTrainControl(MentalCommandDetection.IEE_MentalCommandTrainingControl_t.MC_ACCEPT.getType());
}
})
.setNegativeButton("No",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
engineConnector.setTrainControl(MentalCommandDetection.IEE_MentalCommandTrainingControl_t.MC_REJECT.getType());
}
});
AlertDialog alertDialog = alertDialogBuilder.create();
alertDialog.show();
}
@Override
public void trainFailed(){
progressBarTime.setVisibility(View.INVISIBLE);
btnTrain.setText("Train");
enableClick();
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
ActivityTraining.this);
// set title
alertDialogBuilder.setTitle("Training Failed");
// set dialog message
alertDialogBuilder
.setMessage("Signal is noisy. Can't training")
.setCancelable(false)
.setIcon(R.drawable.ic_launcher)
.setPositiveButton("OK",
new DialogInterface.OnClickListener() {
public void onClick(
DialogInterface dialog, int which) {
}
});
AlertDialog alertDialog = alertDialogBuilder.create();
alertDialog.show();
isTraining = false;
}
@Override
public void trainCompleted() {
// TODO Auto-generated method stub
DataSpinner data=model.get(indexAction);
data.setChecked(true);
model.set(indexAction, data);
spinAdapter.notifyDataSetChanged();
isTraining = false;
}
@Override
public void trainRejected() {
// TODO Auto-generated method stub
DataSpinner data=model.get(indexAction);
data.setChecked(false);
model.set(indexAction, data);
spinAdapter.notifyDataSetChanged();
enableClick();
isTraining = false;
}
@Override
public void trainErased() {
// TODO Auto-generated method stub
new AlertDialog.Builder(this)
.setTitle("Training Erased")
.setMessage("")
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
}
})
.setIcon(android.R.drawable.ic_dialog_alert)
.show();
DataSpinner data=model.get(indexAction);
data.setChecked(false);
model.set(indexAction, data);
spinAdapter.notifyDataSetChanged();
enableClick();
isTraining = false;
}
@Override
public void trainReset() {
// TODO Auto-generated method stub
if(timer!=null){
timer.cancel();
timerTask.cancel();
}
isTraining = false;
progressBarTime.setVisibility(View.VISIBLE);
progressBarTime.setProgress(0);
enableClick();
};
问题就从这里开始。当我从服务类调用计时器时,_currentAction 和 _currentPower 的值不会更新到该类中。连接脑电耳机后正常值应如下: _当前操作 = 1 _当前功率 = 0.0此外,它不会更新类中的值,并且不断返回 _currentAction = 0 和 _currentPower = 0.0 的值虽然这是正常的,因为这些是在类的开头声明变量的值。
当我在 ActivityTraining 类中使用计时器时,值会得到很好的更新。
@Override
public void currentAction(int typeAction, float power) {
// TODO Auto-generated method stub
progressPower.setProgress((int)(power*100));
_currentAction = typeAction;
_currentPower = power;
}
public void TrainingHomePage(View v) {
Intent goingB = new Intent(this, MainActivity.class);
setResult(RESULT_OK, goingB);
finish();
}
}
这是我的服务等级
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.widget.Toast;
import com.example.assiotiscy.headshake.MentalCommand.ActivityTraining;
import java.util.Timer;
import java.util.TimerTask;
public class StartEndEpocService extends Service {
ActivityTraining activityTraining = new ActivityTraining();
Timer timeListenAction;
@Override
public void onCreate() {
super.onCreate();
//Toast.makeText(this, "service starting", Toast.LENGTH_SHORT).show();
thread();
}
private void thread () {
timeListenAction =new Timer();
timeListenAction.scheduleAtFixedRate(new TimerTask() {
@Override
public void run () {
activityTraining.connect();
}
},0,20);
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Toast.makeText(this, "Service Started...", Toast.LENGTH_SHORT).show();
return START_NOT_STICKY;
}
@Override
public IBinder onBind(Intent intent) {
// We don't provide binding, so return null
return null;
}
@Override
public void onDestroy() {
Toast.makeText(this, "Service Stopped...", Toast.LENGTH_SHORT).show();
if (timeListenAction != null){
timeListenAction.cancel();
timeListenAction.purge();
}
}
}
/最后这是我的 EngineConnector 类。/
import android.content.Context;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import com.emotiv.insight.IEdk;
import com.emotiv.insight.IEdkErrorCode;
import com.emotiv.insight.IEmoStateDLL;
import com.emotiv.insight.IEmoStateDLL.IEE_MentalCommandAction_t;
import com.emotiv.insight.MentalCommandDetection;
import com.emotiv.insight.MentalCommandDetection.IEE_MentalCommandTrainingControl_t;
import java.util.Timer;
import java.util.TimerTask;
public class EngineConnector {
public static Context context;
public static EngineConnector engineConnectInstance = null;
private Timer timer;
private TimerTask timerTask;
public boolean isConnected = false;
private int state;
private int userId = -1;
private boolean firstActionAdded = false;
public EngineInterface delegate;
public static void setContext(Context context) {
EngineConnector.context = context;
}
public static EngineConnector shareInstance() {
if (engineConnectInstance == null) {
engineConnectInstance = new EngineConnector() {
};
}
return engineConnectInstance;
}
public EngineConnector() {
connectEngine();
}
private void connectEngine() {
IEdk.IEE_EngineConnect(EngineConnector.context, "");
timer = new Timer();
timerTask();
timer.schedule(timerTask, 0, 10);
}
这是脑电图的连接发生的情况。我还从这个类中删除了一些不必要的代码。
public void timerTask() {
if (timerTask != null)
return;
timerTask = new TimerTask() {
@Override
public void run() {
/*Connect device with Epoc Plus headset*/
int numberDevice = IEdk.IEE_GetEpocPlusDeviceCount();
//Log.d("EngineConnector: ", "numberDevice: " + numberDevice);
if (numberDevice != 0) {
if (!isConnected)
IEdk.IEE_ConnectEpocPlusDevice(0, false);
}
/*************************************/
state = IEdk.IEE_EngineGetNextEvent();
// Log.d("EngineConnector:- ", "State: " + state);
if (state == IEdkErrorCode.EDK_OK.ToInt()) {
int eventType = IEdk.IEE_EmoEngineEventGetType();
//Log.d("EngineConnector", "eventType: " +eventType);
switch (eventType) {
case TYPE_USER_ADD:
Log.e("connect", "User Added");
isConnected = true;
// TURNING OFF HEADSET WILL RESET ALL ACTIONS EVEN IF IN APP THAT ACTION STILL HAS "V" BESIDE
// userId is re-set by IEE_EmoEngineEventGetUserId();
userId = IEdk.IEE_EmoEngineEventGetUserId();
Log.e("UserID ", "" + userId);
hander.sendEmptyMessage(HANDLER_USER_ADD);
// This is the issue: by default activated action is Push (set by library so there is nothing we could do in our side
// We're going to get around this issue by replace Push with first action that user would choose in enableMentalcommandActions() method
long[] activeAction = MentalCommandDetection.IEE_MentalCommandGetActiveActions(userId);
Log.e("Default Action list: ", "0x" + Long.toBinaryString(activeAction[1]));
break;
case TYPE_USER_REMOVE:
Log.e("disconnect", "User Removed");
isConnected = false;
userId = -1;
hander.sendEmptyMessage(HANDLER_USER_REMOVE);
break;
case TYPE_EMOSTATE_UPDATE:
if (!isConnected)
break;
IEdk.IEE_EmoEngineEventGetEmoState();
hander.sendMessage(hander
.obtainMessage(HANDLER_ACTION_CURRENT));
break;
case TYPE_METACOMMAND_EVENT:
int type = MentalCommandDetection.IEE_MentalCommandEventGetType();
if (type == MentalCommandDetection.IEE_MentalCommandEvent_t.IEE_MentalCommandTrainingStarted
.getType()) {
Log.e("MentalCommand", "training started");
hander.sendEmptyMessage(HANDLER_TRAIN_STARTED);
} else if (type == MentalCommandDetection.IEE_MentalCommandEvent_t.IEE_MentalCommandTrainingSucceeded
.getType()) {
Log.e("MentalCommand", "training Succeeded");
hander.sendEmptyMessage(HANDLER_TRAIN_SUCCEED);
} else if (type == MentalCommandDetection.IEE_MentalCommandEvent_t.IEE_MentalCommandTrainingCompleted
.getType()) {
Log.e("MentalCommand", "training Completed");
hander.sendEmptyMessage(HANDLER_TRAIN_COMPLETED);
} else if (type == MentalCommandDetection.IEE_MentalCommandEvent_t.IEE_MentalCommandTrainingDataErased
.getType()) {
Log.e("MentalCommand", "training erased");
hander.sendEmptyMessage(HANDLER_TRAIN_ERASED);
} else if (type == MentalCommandDetection.IEE_MentalCommandEvent_t.IEE_MentalCommandTrainingFailed
.getType()) {
Log.e("MentalCommand", "training failed");
hander.sendEmptyMessage(HANDLER_TRAIN_FAILED);
} else if (type == MentalCommandDetection.IEE_MentalCommandEvent_t.IEE_MentalCommandTrainingRejected
.getType()) {
Log.e("MentalCommand", "training rejected");
hander.sendEmptyMessage(HANDLER_TRAIN_REJECTED);
} else if (type == MentalCommandDetection.IEE_MentalCommandEvent_t.IEE_MentalCommandTrainingReset
.getType()) {
Log.e("MentalCommand", "training Reset");
hander.sendEmptyMessage(HANDLER_TRAINED_RESET);
}
break;
default:
break;
}
}
}
};
}
Handler hander = new Handler() {
public void handleMessage(Message msg) {
switch (msg.what) {
case HANDLER_USER_ADD:
if (delegate != null)
delegate.userAdd(userId);
break;
case HANDLER_USER_REMOVE:
if (delegate != null)
delegate.userRemoved();
break;
在 Handler_ACTION_CURRENT 中:currentAction 方法引用自 Activity Training 类
case HANDLER_ACTION_CURRENT:
if (delegate != null)
delegate.currentAction(IEmoStateDLL
.IS_MentalCommandGetCurrentAction(), IEmoStateDLL
.IS_MentalCommandGetCurrentActionPower());
break;
case HANDLER_TRAIN_STARTED:
if (delegate != null)
delegate.trainStarted();
break;
case HANDLER_TRAIN_SUCCEED:
if (delegate != null)
delegate.trainSucceed();
break;
case HANDLER_TRAIN_FAILED:
if (delegate != null)
delegate.trainFailed();
break;
case HANDLER_TRAIN_COMPLETED:
if (delegate != null)
delegate.trainCompleted();
break;
case HANDLER_TRAIN_ERASED:
if (delegate != null)
delegate.trainErased();
break;
case HANDLER_TRAIN_REJECTED:
if (delegate != null)
delegate.trainRejected();
break;
case HANDLER_TRAINED_RESET:
if (delegate != null)
delegate.trainReset();
break;
default:
break;
}
}
};
}
我想知道从服务类激活计时器的问题可能是什么。
提前谢谢
最佳答案
我的问题的问题是,由于我的 ActivityTrainning 类已经是一个 Activity ,并且我正在将其另一个对象创建到服务类中(ActivityTrainning ActivityTrainning = new ActivityTrainning()),所以我有 2 个不同的 ActivityTrainning 类对象。
一个简单/好的解决方案如下:
Activity A 应该有一个变量
static ActivityA activityA;
在onCreate状态:
activityA = this;
并添加此方法:
public static ActivityA getInstance(){
return activityA;
}
在 Activity B 中,调用:
ActivityA.getInstance().myFunction(); //call myFunction using activityA
关于java - 从服务类调用并连接到 EEG 耳机时出现计时器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43454325/
我们正在创建一个 n 层 Silverlight LOB 应用程序,并且正在考虑使用 .NET RIA 服务。我们不清楚这与我们当前的 WCF 服务 API 的关系在哪里。我们当前的架构是: 银光
上下文:我在celery + rabbitmq堆栈上有一个主工作系统。 系统已docker化(此处未提供worker服务) version: '2' services: rabbit:
我是 Windows Azure 新手,我正在尝试将我的 Web 应用程序部署到 Windows Azure。在我的应用程序中,我使用了一些 Web 服务,现在我想知道如何在 Windows Azur
因此,根据我对服务的了解,自定义对象似乎是写入服务以返回数据的方式。如果我正在编写将用于 1) 填充数据库或 2) 为网站提供信息的服务,是否有返回数据集/数据表而不是包含所有这些的自定义对象列表的用
我在 google 和 stackoverflow 上都找过答案,但似乎找不到。我正在尝试将 azure 实验的输出获取到应用程序。我使用 ibuildapp 和谷歌表单制作了该应用程序。如何使用 g
我不小心删除了 kubernetes svc: service "kubernetes" deleted 使用: kubectl delete svc --all 我该怎么办?我只是想删除服务,以便
我正在努力确定解决网络服务问题的最有效方法。 我的情况:我正在开发一个 Android 应用程序,它通过 Web 服务从 mysql 数据库(在我自己的服务器 PC 上)存储和检索数据。用户按下提交按
我一直在翻阅 Android 文档,我很好奇。什么时候绑定(bind)服务而不是不绑定(bind)服务?它提供了哪些优点/限制? 最佳答案 When would you bind a service
我试图从架构的角度理解 hive,我指的是 Tom White 关于 Hadoop 的书。 我遇到了以下关于配置单元的术语:Hive Services、hiveserver2、metastore 等。
我的问题:安装服务后我无法导航到基地址,因为服务不会继续运行(立即停止)。我需要在服务器或我的机器上做些什么才能使 baseAddress 有效吗? 背景:我正在尝试学习如何使用 Windows 服务
我正在努力就 Web 服务的正确组织做出决定。我应该有多个 ASMX 来代表 Web 服务中的不同功能,还是应该有一个 ASMX? 如果我有多个 ASMX,这不构成多个 Web 服务吗? 如果我只有一
我正在从事一个在 azure 平台上提供休息服务的项目。该服务由 iPhone 客户端使用,这是选择其余方法的重要原因之一。 我们希望通过 AccessControlService(ACS) 并使用
我是 Ionic 新手,正在使用 Ionic 3.9.2 我有几个终端命令来为我的 ionic 应用程序提供服务,但是,我没有发现这两个命令之间有任何区别。 ionic serve 和 ionic s
关闭。这个问题需要多问focused 。目前不接受答案。 想要改进此问题吗?更新问题,使其仅关注一个问题 editing this post . 已关闭 8 年前。 Improve this ques
作为项目的一部分,我期待着问这个问题。我过去有开发和使用 Web 服务的经验,并且非常熟悉这些服务。但是,有人告诉我,作为下一个项目的一部分,我将需要使用“安全”的 Web 服务。您能否提供一些见解,
我浏览了很多关于这个问题的信息,但找不到解决方案。这里的问题是,我想使用 Apache Cordova 和 Visual Studio 连接到 wcf。因此,如果有人找到合适的工作解决方案,请发布链接
我在 Windows 服务中托管了一个 WCF(从 MS 网站示例中选取),我可以使用 SOAP UI 访问和调用方法。但是,当我尝试使用 jquery 从 Web 应用程序调用相同的方法时,我不断收
我们构建了一个 Android 应用程序,它从 Android 向我的 PHP 服务器发送 HTTP 请求。作为响应,Web 服务将 JSON 对象发送到 Android 应用程序以显示结果。 就像其
我想在 android 应用程序中调用 soap web 服务,它需要一个枚举值作为参数,它是一个标志枚举。如何从 Android 应用程序将一些值作为标志枚举传递给此 Web 服务方法? 我使用 K
我尝试在模拟器上安装 Google Play。我已按照 Google Dev Site 中的说明进行操作. 使用 ADV 管理器似乎没问题,设备的目标是 Google API 版本 22,但是当我运行
我是一名优秀的程序员,十分优秀!