numberformat exception using alarmamanager - crashes before on start(使用警报管理器的 numberformat 异常 - 在开始之前崩溃)
问题描述
---------更新 -----------------------------
---------UPDATE -----------------------------------------
当应用程序启动时,我在以下行收到 numberformat 异常:
When the app starts I receive numberformat exception at line :
final long thetime=Long.parseLong(time_value);
但以上内容不在主要活动中...
But the above aren't in the main activity...
在我在edittex中的xml文件中
In the xml file I have in the edittex
android:inputType="number" .
android:inputType="number" .
这一行在我有警报管理器的 myservice 类中(注意我不能使用 catch,因为在下面(alarm.setRepeating)它不能识别时间"值.
This line is in myservice class in which I have the alarmamanager(note I can't use catch because below(alarm.setRepeating) it doesn't recognize "thetime" value.
protected void onHandleIntent(Intent intent) {
//try{
String time_value;
time_value=(String) intent.getStringExtra("time_value");
final long thetime=Long.parseLong(time_value);// }
// catch (NumberFormatException e) {
/
本文标题为:使用警报管理器的 numberformat 异常 - 在开始之前崩溃
基础教程推荐
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- iOS4 创建后台定时器 2022-01-01
