我有一个dictionary我需要生成一个JSON string使用dictionary.有可能转换它吗?你能帮忙吗?
我需要实现一个Mac OS X应用程序.在我的应用程序中,我需要做两件事:
我在Mac OS X开发方面没有太多经验.任何人都可以建议最好的文件来实现我的目标吗?
在我的iOS应用程序中,我需要支持将视频上传到YouTube.
是否可以在此应用程序中将视频上传到YouTube?如果是这样,我该如何实现呢?
我实现了一个在外部存储中生成和创建文件的应用程序.你能帮帮我,我们怎么能删除它?
谢谢钱德拉
编辑-1: 我添加了以下代码,但我仍然遇到同样的问题,请看下面的代码,
String fullPath = "/mnt/sdcard/";
System.out.println(fullPath);
try{
File file = new File(fullPath, "audio.mp3");
if(file.exists()){
boolean result = file.delete();
System.out.println("Application able to delete the file and result is: " + result);
// file.delete();
}else{
System.out.println("Application doesn't able to delete the file");
}
}catch (Exception e){
Log.e("App", "Exception while deleting file " + e.getMessage());
}
Run Code Online (Sandbox Code Playgroud)
在LogCat中我得到Application能够删除文件,结果是:false.执行此操作后,我附加了屏幕截图.请仔细看看.并建议我.
我正在实现基于客户端的应用程序.我有一个xml字符串.我需要将其转换为JSON格式并发送到服务器.我不知道转换它.你能告诉我任何文件或想法吗?
我使用以下代码将Text to Speech输出存储为我的应用程序中的wav文件.我不确定错误在哪里,你能看一下并建议我吗?
public class MainActivity extends Activity {
Button store, play;
EditText input;
String speakTextTxt;
TextToSpeech mTts;
HashMap<String, String> myHashRender = new HashMap<String, String>();
String tempDestFile ;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
store = (Button) findViewById(R.id.button1);
play = (Button) findViewById(R.id.button2);
input = (EditText) findViewById(R.id.editText1);
store.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
speakTextTxt = "Hello world Hello world Hello world Hello world Hello world Hello world Hello world Hello world Hello world …Run Code Online (Sandbox Code Playgroud) 我正在为Android应用程序使用Text to Speech.我很困惑找到一个在Text to Speech完成后调用的方法.我尝试调用以下方法,但完成后没有调用,请查看以下代码并建议我.
tts= new TextToSpeech(MainActivity.this, new OnInitListener() {
@Override
public void onInit(int status) {
tts.setOnUtteranceCompletedListener(new OnUtteranceCompletedListener() {
@Override
public void onUtteranceCompleted(final String utteranceId) {
System.out.println("Completed");
runOnUiThread(new Runnable() {
@Override
public void run() {
//UI changes
}
});
}
});
}
});
Run Code Online (Sandbox Code Playgroud)
请建议我.我正在使用API Level 17.
最低API级别为12;
我在控制台中收到以下错误:
01-30 09:19:14.149: E/ActivityThread(660): Service com.android.exchange.ExchangeService
has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40ce0ef0 that was originally bound here
01-30 09:19:14.149: E/ActivityThread(660): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40ce0ef0 that was originally bound here
01-30 …Run Code Online (Sandbox Code Playgroud)