草庐IT

start_date

全部标签

java - 安卓 2.2 : How to make an app to run automaticly on startup & how to make an app start another app

主题几乎说明了一切。 最佳答案 使用BroadcastReceiver接收ActionBOOT_COMPLETED的Intent。在onReceive()方法中为您的Activity创建一个Intent:@OverridepublicvoidonReceive(Contextcontext,Intentintent){IntentmyIntent=newIntent(context,YourActivity.class);context.startActivity(myIntent);}

android - ACTION_DISCOVERY_STARTED 从未调用过 android

我有下一个代码:publicclassAddPrinterextendsListActivity{@OverridepublicvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);bluetoothAdapter.startDiscovery();filter=newIntentFilter();filter.addAction(BluetoothDevice.ACTION_FOUND);filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_S

安卓NDK : Function va_start/va_end could not be resolved

我试图在我的项目中使用va_start和va_end函数,但eclipse不想将其解析为函数。gcc编译整个项目没有错误...[我的文件.cpp]#include#include[...]inlinevoidShowDbgMsg(constchar*str,...){va_listargptr;va_start(argptr,str);vprintf(str,argptr);va_end(argptr);}[...][Android.mk][...]LOCAL_C_INCLUDES:=jni/pvrTools/jni/igel/$(STLPORT_BASE)/stlport[...]e

java - 将时区应用于 Date 对象

Datenow=newDate();Datethen=newDate((long)obj.timestamp*1000);TimeZonetz=TimeZone.getDefault();不是很熟悉java,但是有什么方法可以将时区应用于Date对象?我找到了this线程,但这是关于日历时区的,我认为这是不同的东西? 最佳答案 Date对象默认使用当前时区。如果你想打印特定时区的时间,你可以使用SimpleDateFormat作为下面://putthedesiredformatDateFormatformatter=newSimpl

android - 权限拒绝 : starting Intent sharing with gmail

我尝试在我的应用程序中与gmail共享一些文本:StringshareBody="blablabla";IntentsharingIntent=newIntent(Intent.ACTION_VIEW);sharingIntent.setType("plain/text");sharingIntent.setClassName("com.google.android.gm","com.google.android.gm.ComposeActivityGmail");sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,"

flutter Bloc : No ancestor could be found starting from the context?

我是Flutter的新手,也是Bloc的新手。编译代码时出现错误:ThefollowingassertionwasthrownbuildingLogin(dirty,state:_LoginFormState#44e7f):BlocProvider.of()calledwithacontextthatdoesnotcontainaBlocoftypeBtnBloc.NoancestorcouldbefoundstartingfromthecontextthatwaspassedtoBlocProvider.of().Thiscanhappenifthecontextyouusecome

flutter Bloc : No ancestor could be found starting from the context?

我是Flutter的新手,也是Bloc的新手。编译代码时出现错误:ThefollowingassertionwasthrownbuildingLogin(dirty,state:_LoginFormState#44e7f):BlocProvider.of()calledwithacontextthatdoesnotcontainaBlocoftypeBtnBloc.NoancestorcouldbefoundstartingfromthecontextthatwaspassedtoBlocProvider.of().Thiscanhappenifthecontextyouusecome

java - 解决SecurityException : Permission Denial: starting Intent. 我需要什么权限?

我想从应用程序打开Play商店。在三星还好,在一加手机就失败了。我不知道alibaba是从哪里来的。很奇怪。异常java.lang.SecurityException:权限被拒绝:启动Intent{act=android.intent.action.VIEWdat=http://play.google.com/...cmp=com.alibaba.intl.android.apps.poseidon/com.alibaba.android.intl.weex.activity.WeexPageActivity}来自ProcessRecord{a1dd30c15827:a2bliving

android - 可打包的 java.util.Date

我正在尝试使我的类之一成为Parcelable,它的属性之一是Date对象。在writeToParcel()方法中我有:out.writeLong(myDate.getTime());在我的createFromParcel()方法中有person.setDate(newDate(in.readLong()*1000));我传递给我的Intent的对象有一个这样创建的日期:newDate(2000,12,06)但是,当我在另一边读出它时,在另一个Activity中:myDate.getYear()+"-"+myDate.getMonth()+"-"+myDate.getDay()它打印出

mediarecorder.Start() 上的 Android 视频方向更改

这个问题类似于帖子here,here,here,here和here,但我被卡住了,花了几个小时试图弄明白。我有一个摄像机预览(现在总是以正确的方向显示),但是当我点击录制(mediaRecorder.start();)时,视频方向会发生变化。我试过使用setOrientationHint,但它似乎没有什么区别(如以下代码的注释中所标记)。它会影响我的两个测试设备(JellyBean上的Galaxy和Xperia)。请问我该怎么做才能解决这个问题?这是我的代码:XMLJavapackagehockeyj.androidlisttesting;importjava.io.IOExcepti