我正在开发一个提醒应用程序,其中我正在运行后台进程,我希望始终保持运行,以便即使关闭手机,服务也应该提醒用户在特定时间安排的提醒手机开机后.
是否有可能或我需要自己管理它?
有人可以帮忙吗?
Thanx提前.
我开发了一个Android应用程序,并在模拟器和设备上进行了测试.我想将.apk文件导出到客户端进行审核.我使用应用程序清单文件导出未签名的apk并发送它,但是没有安装在他的手机上.
我在这里已经阅读了多个问题但是没有具体解决我的问题.我对这个平台很新.
有人可以帮我这方面吗?
Thanx提前.
Apple拒绝了我的应用,因为:
3.3.1应用程序只能以Apple规定的方式使用Documented API,不得使用或调用任何私有API.应用程序必须最初使用Objective-C,C,C++或JavaScript编写,由iPhone OS WebKit引擎执行,并且只有使用C,C++和Objective-C编写的代码可以编译并直接链接到Documented API(例如,禁止通过中间翻译或兼容性层或工具链接到Documented API的应用程序.
您的应用程序中包含的非公共API是animationDidStop:finished:context:.
这是我使用上述方法调用的方法:
- (void)hideMsg
{
// Slide the view off screen
CGRect frame = self.view.frame;
int retractY;
int retractX;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:.75];
retractY = -190;
retractX = 0;
frame.origin.y = retractY;
frame.origin.x = retractX;
self.view.frame = frame;
//to autorelease the Msg, define stop selector
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
[UIView commitAnimations];
}
Run Code Online (Sandbox Code Playgroud)
我正在使用此方法在某个事件发生后显示滑动消息.
但我没有定义这种方法.当我试图找到它时,只能在CAAnimation.h,UIView.h中找到它.
有没有人遇到同样的问题?你怎么修好它的?
在我的应用程序中出现了一个奇怪的问题,它在加载我的启动画面之前显示黑屏一段时间.这个黑屏不是由于任何正在进行的操作,因为我首先加载我的启动画面然后开始我的xml解析任务.
我甚至尝试使用[window makeKeyAndVisible];但是徒劳无功.
这是'我的代码:
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
comingFromLogin = NO;
//Check For Internet
gotInternet = [self checkInternet]; //Test for Internet, calling the self method
if ( gotInternet == 0)
{
//I have no internet
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Sorry No Network Available" message:nil delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
// internetIcon.hidden = NO;
}
else
{
//I do have internet
[self didLoadSplashScreen];
}
}
-(void)didLoadSplashScreen
{
activity_indicator = [[ActivityIndicator alloc]initWithNibName:@"ActivityIndicator" bundle:nil];
splashScreen = [[splashScreenView alloc]initWithNibName:@"splashScreenView" bundle:nil];
splashScreen.view.alpha …Run Code Online (Sandbox Code Playgroud) 我想从另一个应用程序的活动中调用应用程序的活动.我在这里做的是:
Intent intent = new Intent();
intent.setClassName("another_app_package_name", "another_app_package_name.class_name_in_that_package");
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)
但我的应用程序正在退出抛出NoActivityFound异常,说无法找到显式活动类another_app_package_name.class_name_in_that_package.
我错过了一些明显的东西.有人可以帮忙吗?
我是Android平台的新手.
Thanx提前.
我想知道在类和appDelegate中的同一个类中导入appDelegate的后果.因为,我在我的应用程序中成功完成了这项工作,但建议不要这样做.尽管进行了大量的搜索,但我找不到答案.
提前致谢.
我正在使用以下代码在android中的javascript文件中提取字符串变量:
这个'我的javascript文件:
<script language="javascript">
EDIT:
clsVariable = "vikrant";
function refuseClick(){
clsVariable = "vikrant";
refuse.performClick();
document.getElementById("no").value = "Refuse";
}
</script>
<button type="button" id="no" onClick="refuseClick();">Je refuse</button>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
在我的android类中,我在点击按钮时编写了以下方法.这个按钮点击事件我是从javascript文件调用的:
refuse.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Log.v(LOG_TAG, "variable=" + clsVariable); //This shows me null
}
});
wbvw = (WebView) findViewById (R.id.webvw);
wbvw.setWebViewClient(new HelloWebViewClient());
wbvw.getSettings().setJavaScriptEnabled(true);
WebSettings ws = wbvw.getSettings();
ws.setJavaScriptEnabled(true);
wbvw.addJavascriptInterface(clsVariable, "clsVariable");
wbvw.loadUrl("http://www.sbc.co.in/projects/AndroidTest.html");
}
Run Code Online (Sandbox Code Playgroud)
我是这个平台以及javascripting的新手.
我做错了什么?有人可以帮忙吗?
Thanx提前.
我已经能够从一个活动中运行TTS但是当我尝试从服务执行相同的代码时,它给我的消息是TTS引擎已初始化但没有说出任何内容.
有没有人随时遇到同样的问题?
public void onCreate() {
super.onCreate();
tts = new TextToSpeech(this, this //TextToSpeech.OnInitListener);
timer.scheduleAtFixedRate( new TimerTask()
{ // In timer
public void run() {
//On some condition
tts.speak("thank you", TextToSpeech.QUEUE_ADD, null);
}, 0, 60000);
}
@Override
public void onInit(int status) {
if (status == TextToSpeech.SUCCESS) {
Toast.makeText(BackgroundProcessforTimecheck.this,
"Text-To-Speech engine is initialized", Toast.LENGTH_LONG).show();
}
else if (status == TextToSpeech.ERROR) {
Toast.makeText(BackgroundProcessforTimecheck.this,
"Error occurred while initializing Text-To-Speech engine", Toast.LENGTH_LONG).show();
}
}
Run Code Online (Sandbox Code Playgroud)
有人可以帮忙吗?
android ×6
iphone ×3
apk ×1
cocoa-touch ×1
export ×1
header ×1
ios ×1
javascript ×1
objective-c ×1
service ×1
webview ×1