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 异常 - 在开始之前崩溃
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01