草庐IT

hook_event_proc

全部标签

android - 如何在 Android 上解释/proc/meminfo 的值?

我正在编写一个需要测量当前可用/已用RAM的Android应用程序。搜索此站点显示了多个具有相似主题的主题,通常建议两种方法:方法一:MemoryInfomi=newMemoryInfo();ActivityManageractivityManager=(ActivityManager)getSystemService(ACTIVITY_SERVICE);activityManager.getMemoryInfo(mi);longavailableMegs=mi.availMem/1048576L;totalMegs=mi.totalMem/1048576L;//availablesi

java - 安卓 : Error in Add event of Calender : Unkown URL

我在androidcalender工作。我使用android应用程序以编程方式在Calender中添加事件。我也引用了这个链接:IllegalArgumentException:UnknownURLcontent://com.android.calendar/eventswheninsertinganeventtothecalendaronAndroidAddingeventstonativecalendarisnotworking但在我的代码中不起作用。我的代码是:ContentValuescontentEvent=newContentValues();//ParticularCal

android - 火力地堡分析 : See event data

我正在转换我的应用程序以使用新的Firebase分析而不是谷歌分析。但是我错过了一些我在谷歌分析中使用的关键功能,这些功能根本不存在。首先,当我发送一个事件时,您可以添加一个包含数据的包。我添加了一个包,但我在哪里可以看到我发送的数据?还是免费计划不可能做到这一点?我想念的第二件事是实时View,是否有某种方式可以实时查看正在发生的事情,或者这个功能是否仍在推出。希望有人能解决这些问题。 最佳答案 Firebase在许多方面都远远优于GoogleAnalytics,因此我建议您多尝试使用它,以了解它的工作原理和提供的功能。First

java - Eclipse Android 异常 : Unhandled event loop exception No more handles

这个问题在这里已经有了答案:EclipseUnhandledeventloopexception,nomorehandlesWindows7(8个答案)关闭7年前。我是android编程的新手。这是我的问题。即使在所有新创建的项目文件中,我也经常遇到此异常。我捕获了那个异常。实际上我可以使用android,尽管我有这个错误,并且在第二个窗口按“否”后也能够运行模拟器。只有当我在包资源管理器和Java代码之间切换时才会发生这种情况。不在xmlView中。我想知道我是否可以忽略此异常并继续。谢谢当按下ok我明白了entercodehereHereismyerrorlog!SESSION20

安卓 Firebase 数据库 : Single data fetch without event listener

现在,以下是我在Firebase数据库控制台中的数据库层次结构。我正在使用以下代码将数据输入到firebase数据库中。publicvoidcreateRecordInDB(PlaceListItemplaceListItem){mDB=FirebaseDatabase.getInstance().getReference();mListItemRef=mDB.child("Places");for(inti=0;iresult=newHashMap();result.put(key,placeDBModel);mListItemRef.updateChildren(result);}

android - 2048 kb 的游标窗口分配失败。 # Open Cursors=1 (# cursors opened by this proc=1)

我正在制作一个使用数据库的Kiosk应用程序。该应用程序一直在前台运行。该应用程序有许多使用一个共享DataBaseHelper实例的线程。该应用程序运行完美,但大部分时间在5或6小时后,我遇到这些异常,然后应用程序崩溃:E/DataBaseHelper﹕Cursorwindowallocationof2048kbfailed.#OpenCursors=1(#cursorsopenedbythisproc=1)E/CursorWindow﹕CouldnotallocateCursorWindow'/data/user/0/com.kios.frm/databases/YadProjec

android - 无法弄清楚如何使用 ImageViewTouch Hook

我正在使用该库(https://github.com/sephiroth74/ImageViewZoom),但我在尝试找出fling时遇到了问题。我已经阅读了其他答案,但它们没有显示用于获取fling事件的实际代码。我迷上了像这样的throw事件:mImage.setOnTouchListener(newOnTouchListener(){@OverridepublicbooleanonTouch(Viewv,MotionEventevent){returngestureDetector.onTouchEvent(event);}});gestureDetector=newGestur

android - Android : Testing events? 中的 Robolectric

我已经使用robolectric编写了一些测试,现在我想做一些真正的测试类(class)。我注意到的一件事是我无法测试onCreate、onLocationChanged等事件。测试事件的标准做法是什么?我是否应该提取事件中的代码并将它们放在一个方法中,事件将调用该方法,robolectro也可以调用该方法,当然该方法需要是公共(public)的,对吗?另外,如果我想在我的方法中测试通常是私有(private)变量的东西,那么我需要添加一个公共(public)getter,对吧?我可以从robolectric检查这个吗?是否有更好的方法将数据公开给robolectric?

安卓 : detect click event at empty space of gridview inside linearlayout

我有以下问题。我在LinearLayout中有一个GridView,如下图所示。当用户点击GridView的空白区域时,我想检测点击事件,在图像中,我想要的位置是红色区域,也在绿色区域内。但我有以下问题。如果我为GridView添加onClickListener:错误,因为Adapter无法添加点击事件。如果我为GridView添加onItemClickListener:我就可以检测到项目存在的位置(图中是白框)如果我为LinearLayout添加onClickListener,我只能在绿色区域检测点击事件,而不是红色区域。那么我该如何解决上述问题。@Edit:我的布局看起来像:谢谢:

c# - Xamarin.Android : How to capture Button events defined in the OnClick XML attribute?

我在RelativeLayout中有这个Button,它作为自定义ListView行布局的一部分包含在内。当用户点击Button时,我希望Button调用这个函数:publicvoidmyClickHandler(Viewv){Console.WriteLine((vasButton).Text);}但是,我收到了这个错误java.lang.IllegalStateException:CouldnotfindamethodmyClickHandler(View)intheactivityclassTest_Project.MyActivityforonClickhandleronvie