小编Cod*_*Alx的帖子

我该怎么办:这需要android.permission.INTERACT_ACROSS_USERS_FULL

我正在努力将micode的开源指南针集成到我正在制作的应用程序中.我想知道如何在我的清单中明确说明正确的拼写时如何解决此权限错误.它仍然出现,我需要这个许可.

这令我感到困惑......

11-03 13:53:58.241: E/AndroidRuntime(8975): Caused by: \
    java.lang.SecurityException: Permission Denial: registerReceiver from \
    net.micode.compass asks to run as user -1 but is calling from user 0; this \
    requires android.permission.INTERACT_ACROSS_USERS_FULL
Run Code Online (Sandbox Code Playgroud)

android android-permissions

15
推荐指数
2
解决办法
4万
查看次数

C#将文本保存为语音到MP3文件

我想知道是否有办法将文本语音数据保存为mp3或Wav文件格式以便以后播放?

SpeechSynthesizer reader = new SpeechSynthesizer();
reader.Rate = (int)-2;
reader.Speak("Hello this is an example expression from the computers TTS engine in C-Sharp);
Run Code Online (Sandbox Code Playgroud)

我试图将其保存在外部,以便我可以稍后再播放.做这个的最好方式是什么?

c# text-to-speech

12
推荐指数
2
解决办法
1万
查看次数

Android GPS查询错误的位置数据

我没有使用模拟位置......事实上,上周代码工作正常.

我有一个应用程序收集GPS数据并使用应用程序本身生成的X,Y坐标吐出谷歌地图链接.我不是百分之百确定为什么它不按预期的方式工作但是当我要求应用程序根据手机提供的GPS位置制作谷歌地图链接时它告诉我我距离我的点5到6个街区起源(当时我实际上在哪里)不是我想要的

的已知,:

  • 我已设置适当的权限
  • 所有代码上周都运行得很好

以下是收集GPS信息的代码:

        Toast.makeText(context, "Gathering GPS Data...", Toast.LENGTH_SHORT).show();
    gps = new gpsTracker(Settings.this);
    if(gps.canGetLocation()){
        try{
            gps.getLocation();
            lon = gps.getLongitude();
            lat = gps.getLatitude();
            Toast.makeText(getApplicationContext(), "Your location is - \nlat: " + lat + "\nlon: " + lon, Toast.LENGTH_LONG).show();
        }
        catch(Exception  e){}
    }
    else{
        gps.showSettingsAlert();
    }
Run Code Online (Sandbox Code Playgroud)

所有上述课程都来自:

import android.app.AlertDialog;
import android.app.Service;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.os.IBinder;
import android.provider.Settings;
import android.util.Log;

public class gpsTracker extends Service implements LocationListener {

private …
Run Code Online (Sandbox Code Playgroud)

java gps android

7
推荐指数
1
解决办法
4185
查看次数

试用版应用程序的时间限制

我正在寻找我制作的应用程序的试用版.基本上我想对应用程序在窗口启动之前的运行时间设置一个时间限制,指出用户必须购买付费版本的应用程序.

感谢您提前提示!

android version trial

2
推荐指数
1
解决办法
1283
查看次数

标签 统计

android ×3

android-permissions ×1

c# ×1

gps ×1

java ×1

text-to-speech ×1

trial ×1

version ×1